Bobby Rong 2024-10-16 12:15:23 +00:00
parent e57a1d1bd7
commit 16b6193730
No known key found for this signature in database

View File

@ -1,10 +1,14 @@
{ lib
, mkXfceDerivation
, wayland-scanner
, gtk3
, libnotify
, libxfce4ui
, libxfce4util
, polkit
, upower
, wayland-protocols
, wlr-protocols
, xfconf
, xfce4-panel
}:
@ -12,16 +16,23 @@
mkXfceDerivation {
category = "xfce";
pname = "xfce4-power-manager";
version = "4.18.4";
version = "4.20.0";
sha256 = "sha256-aybY+B8VC/XS6FO3XRpYuJd9Atr9Tc/Uo45q9fh3YLE=";
sha256 = "sha256-qKUdrr+giLzNemhT3EQsOKTSiIx50NakmK14Ak7ZOCE=";
nativeBuildInputs = [
wayland-scanner
];
buildInputs = [
gtk3
libnotify
libxfce4ui
libxfce4util
polkit
upower
wayland-protocols
wlr-protocols
xfconf
xfce4-panel
];
@ -29,8 +40,8 @@ mkXfceDerivation {
# using /run/current-system/sw/bin instead of nix store path prevents polkit permission errors on
# rebuild. See https://github.com/NixOS/nixpkgs/issues/77485
postPatch = ''
substituteInPlace src/org.xfce.power.policy.in2 --replace-fail "@sbindir@" "/run/current-system/sw/bin"
substituteInPlace common/xfpm-brightness.c --replace-fail "SBINDIR" "\"/run/current-system/sw/bin\""
substituteInPlace src/org.xfce.power.policy.in.in --replace-fail "@sbindir@" "/run/current-system/sw/bin"
substituteInPlace common/xfpm-brightness-polkit.c --replace-fail "SBINDIR" "\"/run/current-system/sw/bin\""
substituteInPlace src/xfpm-suspend.c --replace-fail "SBINDIR" "\"/run/current-system/sw/bin\""
'';