Skip to content

Commit

Permalink
geocode-glib: 3.26.2 → 3.26.3
Browse files Browse the repository at this point in the history
https://gitlab.gnome.org/GNOME/geocode-glib/-/compare/3.26.2...3.26.3

- Add support for linking against libsoup 3 (incompatible ABI).
- Format the expression.
- Register installed tests (currently broken).
  • Loading branch information
jtojnar committed Jul 2, 2022
1 parent e13726c commit fb2877c
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 12 deletions.
1 change: 1 addition & 0 deletions nixos/tests/installed-tests/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ in
fwupd = callInstalledTest ./fwupd.nix {};
gcab = callInstalledTest ./gcab.nix {};
gdk-pixbuf = callInstalledTest ./gdk-pixbuf.nix {};
geocode-glib = callInstalledTest ./geocode-glib.nix {};
gjs = callInstalledTest ./gjs.nix {};
glib-networking = callInstalledTest ./glib-networking.nix {};
gnome-photos = callInstalledTest ./gnome-photos.nix {};
Expand Down
52 changes: 42 additions & 10 deletions pkgs/development/libraries/geocode-glib/default.nix
Original file line number Diff line number Diff line change
@@ -1,31 +1,63 @@
{ fetchurl, lib, stdenv, meson, ninja, pkg-config, gettext, gtk-doc, docbook_xsl, gobject-introspection, gnome, libsoup, json-glib, glib }:
{ fetchurl
, lib
, stdenv
, meson
, ninja
, pkg-config
, gettext
, gtk-doc
, docbook-xsl-nons
, gobject-introspection
, gnome
, libsoup
, json-glib
, glib
, nixosTests
}:

stdenv.mkDerivation rec {
pname = "geocode-glib";
version = "3.26.2";
version = "3.26.3";

outputs = [ "out" "dev" "devdoc" "installedTests" ];

src = fetchurl {
url = "mirror://gnome/sources/geocode-glib/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
sha256 = "1l8g0f13xgkrk335afr9w8k46mziwb2jnyhl07jccl5yl37q9zh1";
url = "mirror://gnome/sources/geocode-glib/${lib.versions.majorMinor version}/geocode-glib-${version}.tar.xz";
sha256 = "Hf6ug7kOzMobbPfc98XjsxeCjPC1YgXERx7w+RGZl2Y=";
};

nativeBuildInputs = [ meson ninja pkg-config gettext gtk-doc docbook_xsl gobject-introspection ];
buildInputs = [ glib libsoup json-glib ];

patches = [
./installed-tests-path.patch
];

postPatch = ''
substituteInPlace geocode-glib/tests/meson.build --subst-var-by "installedTests" "$installedTests"
'';
nativeBuildInputs = [
meson
ninja
pkg-config
gettext
gtk-doc
docbook-xsl-nons
gobject-introspection
];

buildInputs = [
glib
libsoup
json-glib
];

mesonFlags = [
"-Dsoup2=${lib.boolToString (lib.versionOlder libsoup.version "2.99")}"
"-Dinstalled_test_prefix=${placeholder "installedTests"}"
];

passthru = {
updateScript = gnome.updateScript {
packageName = pname;
};
tests = {
installed-tests = nixosTests.installed-tests.geocode-glib;
};
};

meta = with lib; {
Expand Down
16 changes: 14 additions & 2 deletions pkgs/development/libraries/geocode-glib/installed-tests-path.patch
Original file line number Diff line number Diff line change
@@ -1,8 +1,20 @@
--- a/geocode-glib/tests/meson.build
+++ b/geocode-glib/tests/meson.build
@@ -1,4 +1,4 @@
-install_dir = get_option('libexecdir') + '/installed-tests/geocode-glib'
+install_dir = '@installedTests@/libexec/installed-tests/geocode-glib'
-install_dir = get_option('prefix') / get_option('datadir') / 'installed-tests' / library_name
+install_dir = get_option('installed_test_prefix') / 'share' / 'installed-tests' / library_name

e = executable('geo-uri',
'geo-uri.c',
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -1,6 +1,9 @@
option('enable-installed-tests',
type: 'boolean', value: true,
description: 'Build & install test programs')
+option('installed_test_prefix',
+ type: 'string', value: '',
+ description: 'Prefix for installed tests')
option('enable-introspection',
type: 'boolean', value: true,
description: 'Whether to enable the introspection generation')

0 comments on commit fb2877c

Please sign in to comment.