mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-07 21:43:32 +00:00
571c71e6f7
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.
109 lines
2.3 KiB
Nix
109 lines
2.3 KiB
Nix
{ lib
|
|
, stdenv
|
|
, fetchFromGitLab
|
|
, intltool
|
|
, meson
|
|
, mesonEmulatorHook
|
|
, ninja
|
|
, pkg-config
|
|
, gtk-doc
|
|
, docbook-xsl-nons
|
|
, docbook_xml_dtd_412
|
|
, glib
|
|
, json-glib
|
|
, libsoup_3
|
|
, libnotify
|
|
, gdk-pixbuf
|
|
, modemmanager
|
|
, avahi
|
|
, glib-networking
|
|
, python3
|
|
, wrapGAppsHook3
|
|
, gobject-introspection
|
|
, vala
|
|
, withDemoAgent ? false
|
|
, nix-update-script
|
|
}:
|
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
|
pname = "geoclue";
|
|
version = "2.7.2";
|
|
|
|
outputs = [ "out" "dev" "devdoc" ];
|
|
|
|
src = fetchFromGitLab {
|
|
domain = "gitlab.freedesktop.org";
|
|
owner = "geoclue";
|
|
repo = "geoclue";
|
|
rev = "refs/tags/${finalAttrs.version}";
|
|
hash = "sha256-LwL1WtCdHb/NwPr3/OLISwaAwplhJwiZT9vUdX29Bbs=";
|
|
};
|
|
|
|
patches = [
|
|
./add-option-for-installation-sysconfdir.patch
|
|
];
|
|
|
|
nativeBuildInputs = [
|
|
pkg-config
|
|
intltool
|
|
meson
|
|
ninja
|
|
wrapGAppsHook3
|
|
python3
|
|
vala
|
|
gobject-introspection
|
|
# devdoc
|
|
gtk-doc
|
|
docbook-xsl-nons
|
|
docbook_xml_dtd_412
|
|
] ++ lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [
|
|
mesonEmulatorHook
|
|
];
|
|
|
|
buildInputs = [
|
|
glib
|
|
json-glib
|
|
libsoup_3
|
|
avahi
|
|
] ++ lib.optionals withDemoAgent [
|
|
libnotify gdk-pixbuf
|
|
] ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [
|
|
modemmanager
|
|
];
|
|
|
|
propagatedBuildInputs = [
|
|
glib
|
|
glib-networking
|
|
];
|
|
|
|
mesonFlags = [
|
|
"-Dsystemd-system-unit-dir=${placeholder "out"}/lib/systemd/system"
|
|
"-Ddemo-agent=${lib.boolToString withDemoAgent}"
|
|
"--sysconfdir=/etc"
|
|
"-Dsysconfdir_install=${placeholder "out"}/etc"
|
|
"-Ddbus-srv-user=geoclue"
|
|
] ++ lib.optionals stdenv.hostPlatform.isDarwin [
|
|
"-D3g-source=false"
|
|
"-Dcdma-source=false"
|
|
"-Dmodem-gps-source=false"
|
|
"-Dnmea-source=false"
|
|
];
|
|
|
|
postPatch = ''
|
|
chmod +x demo/install-file.py
|
|
patchShebangs demo/install-file.py
|
|
'';
|
|
|
|
passthru.updateScript = nix-update-script {};
|
|
|
|
meta = with lib; {
|
|
broken = stdenv.hostPlatform.isDarwin && withDemoAgent;
|
|
description = "Geolocation framework and some data providers";
|
|
homepage = "https://gitlab.freedesktop.org/geoclue/geoclue/wikis/home";
|
|
changelog = "https://gitlab.freedesktop.org/geoclue/geoclue/-/blob/${finalAttrs.version}/NEWS";
|
|
maintainers = with maintainers; [ raskin mimame ];
|
|
platforms = with platforms; linux ++ darwin;
|
|
license = licenses.lgpl2Plus;
|
|
};
|
|
})
|