xfce4-power-manager: Don't use /run/current-system/sw/bin in org.freedesktop.policykit.exec.path
So polkit popup no longer appears when adjusting brightness with polkit 127.
To ensure the xpm's realpath matches org.freedesktop.policykit.exec.path after `nixos-rebuild
switch` (where xpm won't be restarted), we still need to keep the other two substitutions.
ref: https://github.com/polkit-org/polkit/commit/9aa43e089d870a8ee695e625237c5b731b250678
ref: 6a2999310e
This commit is contained in:
@@ -56,12 +56,15 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
# 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.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\""
|
||||
'';
|
||||
|
||||
configureFlags = [ "--enable-maintainer-mode" ];
|
||||
configureFlags = [
|
||||
"--enable-maintainer-mode"
|
||||
"--sbindir=\${out}/bin"
|
||||
];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
passthru.updateScript = gitUpdater {
|
||||
|
||||
Reference in New Issue
Block a user