diff options
-rw-r--r-- | nixos/tests/installed-tests/default.nix | 1 | ||||
-rw-r--r-- | pkgs/development/libraries/geocode-glib/default.nix | 52 | ||||
-rw-r--r-- | pkgs/development/libraries/geocode-glib/installed-tests-path.patch | 16 |
3 files changed, 57 insertions, 12 deletions
diff --git a/nixos/tests/installed-tests/default.nix b/nixos/tests/installed-tests/default.nix index c6fb37cfe5842..b81384aa8c0b5 100644 --- a/nixos/tests/installed-tests/default.nix +++ b/nixos/tests/installed-tests/default.nix @@ -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 {}; diff --git a/pkgs/development/libraries/geocode-glib/default.nix b/pkgs/development/libraries/geocode-glib/default.nix index 458e0d59a0d5d..090dbcc70169d 100644 --- a/pkgs/development/libraries/geocode-glib/default.nix +++ b/pkgs/development/libraries/geocode-glib/default.nix @@ -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; { diff --git a/pkgs/development/libraries/geocode-glib/installed-tests-path.patch b/pkgs/development/libraries/geocode-glib/installed-tests-path.patch index 499c680080883..c68b7a3a75c3c 100644 --- a/pkgs/development/libraries/geocode-glib/installed-tests-path.patch +++ b/pkgs/development/libraries/geocode-glib/installed-tests-path.patch @@ -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') |