14 gobject-introspection,
30 stdenv.mkDerivation (finalAttrs: {
31 pname = "power-profiles-daemon";
39 src = fetchFromGitLab {
40 domain = "gitlab.freedesktop.org";
42 repo = "power-profiles-daemon";
43 rev = finalAttrs.version;
44 hash = "sha256-kX8adu+GXxkaHtARUKp51K3Jf9xO+l12vctsJzIavyM=";
56 libxml2 # for xmllint for stripping GResources
57 libxslt # for xsltproc for building docs
60 # checkInput but checked for during the configuring
61 (python3.pythonOnBuildForHost.withPackages (
71 ++ lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [
83 (python3.withPackages (ps: [
100 "-Dsystemdsystemunitdir=${placeholder "out"}/lib/systemd/system"
103 "-Dzshcomp=${placeholder "out"}/share/zsh/site-functions"
104 "-Dtests=${lib.boolToString (stdenv.buildPlatform.canExecute stdenv.hostPlatform)}"
109 # Only need to wrap the Python tool (powerprofilectl)
110 dontWrapGApps = true;
112 PKG_CONFIG_POLKIT_GOBJECT_1_POLICYDIR = "${placeholder "out"}/share/polkit-1/actions";
115 patchShebangs --build \
116 tests/integration-test.py \
117 tests/unittest_inspector.py
119 patchShebangs --host \
124 wrapGApp "$out/bin/powerprofilesctl"
128 updateScript = nix-update-script { };
130 nixos = nixosTests.power-profiles-daemon;
135 changelog = "https://gitlab.freedesktop.org/upower/power-profiles-daemon/-/releases/${finalAttrs.version}";
136 homepage = "https://gitlab.freedesktop.org/upower/power-profiles-daemon";
137 description = "Makes user-selected power profiles handling available over D-Bus";
138 mainProgram = "powerprofilesctl";
139 platforms = platforms.linux;
140 license = licenses.gpl3Plus;
141 maintainers = with maintainers; [