From 6a7da5b520eba152f200cd761e4d90e6aa404af5 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Sat, 2 Jul 2022 15:14:07 +0200 Subject: [PATCH] geocode-glib: fix installed tests --- nixos/tests/installed-tests/geocode-glib.nix | 13 +++++++++++++ .../libraries/geocode-glib/default.nix | 19 +++++++++++++++++-- 2 files changed, 30 insertions(+), 2 deletions(-) create mode 100644 nixos/tests/installed-tests/geocode-glib.nix diff --git a/nixos/tests/installed-tests/geocode-glib.nix b/nixos/tests/installed-tests/geocode-glib.nix new file mode 100644 index 000000000000..fcb38c96ab0f --- /dev/null +++ b/nixos/tests/installed-tests/geocode-glib.nix @@ -0,0 +1,13 @@ +{ pkgs, makeInstalledTest, ... }: + +makeInstalledTest { + testConfig = { + i18n.supportedLocales = [ + "en_US.UTF-8/UTF-8" + # The tests require this locale available. + "en_GB.UTF-8/UTF-8" + ]; + }; + + tested = pkgs.geocode-glib; +} diff --git a/pkgs/development/libraries/geocode-glib/default.nix b/pkgs/development/libraries/geocode-glib/default.nix index 090dbcc70169..346741652065 100644 --- a/pkgs/development/libraries/geocode-glib/default.nix +++ b/pkgs/development/libraries/geocode-glib/default.nix @@ -1,6 +1,7 @@ -{ fetchurl +{ stdenv , lib -, stdenv +, fetchurl +, fetchpatch , meson , ninja , pkg-config @@ -28,6 +29,20 @@ stdenv.mkDerivation rec { patches = [ ./installed-tests-path.patch + + # Install data for pi test. + (fetchpatch { + url = "https://gitlab.gnome.org/GNOME/geocode-glib/-/commit/0eb5c21cf4deb2c45aedf5a4393d4208b8dc6d58.patch"; + sha256 = "DmaPzGEu7f+gjjb2HSZ3+ZMc4EJSsba9ufsVysB0UPA="; + }) + # Fix pi test. + (fetchpatch { + url = "https://gitlab.gnome.org/GNOME/geocode-glib/-/commit/464bb3bae5525566a7f41d157f73575cc4f3b5f8.patch"; + sha256 = "qSjXR8eKl+E38Zp7/Kgge/FxOLHYUJgRSR68okc3No0="; + postFetch = '' + substituteInPlace $out --replace "LC_MESSAGES" "LC_ALL" + ''; + }) ]; nativeBuildInputs = [