mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-07 13:33:12 +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.
62 lines
1.3 KiB
Nix
62 lines
1.3 KiB
Nix
{ lib
|
|
, stdenv
|
|
, fetchFromGitLab
|
|
, glib
|
|
, cmake
|
|
, libxml2
|
|
, meson
|
|
, ninja
|
|
, pkg-config
|
|
, libgudev
|
|
, systemd
|
|
, polkit
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "iio-sensor-proxy";
|
|
version = "3.5";
|
|
|
|
src = fetchFromGitLab {
|
|
domain = "gitlab.freedesktop.org";
|
|
owner = "hadess";
|
|
repo = pname;
|
|
rev = version;
|
|
hash = "sha256-pFu+nJzj45s7yIKoLWLeiv2AT5vLf6JpdWWQ0JZfnvY=";
|
|
};
|
|
|
|
postPatch = ''
|
|
# upstream meson.build currently doesn't have an option to change the default polkit dir
|
|
substituteInPlace data/meson.build \
|
|
--replace 'polkit_policy_directory' "'$out/share/polkit-1/actions'"
|
|
'';
|
|
|
|
buildInputs = [
|
|
libgudev
|
|
systemd
|
|
polkit
|
|
];
|
|
|
|
nativeBuildInputs = [
|
|
meson
|
|
cmake
|
|
glib
|
|
libxml2
|
|
ninja
|
|
pkg-config
|
|
];
|
|
|
|
mesonFlags = [
|
|
(lib.mesonOption "udevrulesdir" "${placeholder "out"}/lib/udev/rules.d")
|
|
(lib.mesonOption "systemdsystemunitdir" "${placeholder "out"}/lib/systemd/system")
|
|
];
|
|
|
|
meta = with lib; {
|
|
description = "Proxy for sending IIO sensor data to D-Bus";
|
|
mainProgram = "monitor-sensor";
|
|
homepage = "https://gitlab.freedesktop.org/hadess/iio-sensor-proxy";
|
|
license = licenses.gpl3;
|
|
maintainers = with maintainers; [ _999eagle ];
|
|
platforms = platforms.linux;
|
|
};
|
|
}
|