nixpkgs/pkgs/by-name/ge/geocode-glib/package.nix
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
We are migrating packages that meet below requirements:

1. using `callPackage`
2. called path is a directory
3. overriding set is empty (`{ }`)
4. not containing path expressions other than relative path (to
makenixpkgs-vet happy)
5. not referenced by nix files outside of the directory, other
than`pkgs/top-level/all-packages.nix`
6. not referencing nix files outside of the directory
7. not referencing `default.nix` (since it's changed to `package.nix`)
8. `outPath` doesn't change after migration

The tool is here: https://github.com/Aleksanaa/by-name-migrate.
2024-11-09 20:04:51 +08:00

73 lines
1.4 KiB
Nix

{ stdenv
, lib
, fetchurl
, meson
, mesonEmulatorHook
, 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.4";
outputs = [ "out" "dev" "devdoc" "installedTests" ];
src = fetchurl {
url = "mirror://gnome/sources/geocode-glib/${lib.versions.majorMinor version}/geocode-glib-${version}.tar.xz";
sha256 = "LZpoJtFYRwRJoXOHEiFZbaD4Pr3P+YuQxwSQiQVqN6o=";
};
patches = [
./installed-tests-path.patch
];
nativeBuildInputs = [
meson
ninja
pkg-config
gettext
gtk-doc
docbook-xsl-nons
gobject-introspection
] ++ lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [
mesonEmulatorHook
];
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; {
description = "Convenience library for the geocoding and reverse geocoding using Nominatim service";
license = licenses.lgpl2Plus;
maintainers = teams.gnome.members;
platforms = platforms.unix;
};
}