btrbk: add mainProgram (#356350)
[NixPkgs.git] / pkgs / by-name / ge / geocode-glib / package.nix
blobc33b2cd6d3914a7ba073b7fa0d9719d9b2bb08af
1 { stdenv
2 , lib
3 , fetchurl
4 , meson
5 , mesonEmulatorHook
6 , ninja
7 , pkg-config
8 , gettext
9 , gtk-doc
10 , docbook-xsl-nons
11 , gobject-introspection
12 , gnome
13 , libsoup
14 , json-glib
15 , glib
16 , nixosTests
19 stdenv.mkDerivation rec {
20   pname = "geocode-glib";
21   version = "3.26.4";
23   outputs = [ "out" "dev" "devdoc" "installedTests" ];
25   src = fetchurl {
26     url = "mirror://gnome/sources/geocode-glib/${lib.versions.majorMinor version}/geocode-glib-${version}.tar.xz";
27     sha256 = "LZpoJtFYRwRJoXOHEiFZbaD4Pr3P+YuQxwSQiQVqN6o=";
28   };
30   patches = [
31     ./installed-tests-path.patch
32   ];
34   nativeBuildInputs = [
35     meson
36     ninja
37     pkg-config
38     gettext
39     gtk-doc
40     docbook-xsl-nons
41     gobject-introspection
42   ] ++ lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [
43     mesonEmulatorHook
44   ];
46   buildInputs = [
47     glib
48     libsoup
49     json-glib
50   ];
52   mesonFlags = [
53     "-Dsoup2=${lib.boolToString (lib.versionOlder libsoup.version "2.99")}"
54     "-Dinstalled_test_prefix=${placeholder "installedTests"}"
55   ];
57   passthru = {
58     updateScript = gnome.updateScript {
59       packageName = pname;
60     };
61     tests = {
62       installed-tests = nixosTests.installed-tests.geocode-glib;
63     };
64   };
66   meta = with lib; {
67     description = "Convenience library for the geocoding and reverse geocoding using Nominatim service";
68     license = licenses.lgpl2Plus;
69     maintainers = teams.gnome.members;
70     platforms = platforms.unix;
71   };