gtklock-powerbar-module: Fix systemctl command paths (#418468)
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
pkg-config,
|
||||
gtk3,
|
||||
gtklock,
|
||||
systemd,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
@@ -28,6 +29,17 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
|
||||
buildInputs = [ gtk3 ];
|
||||
|
||||
postPatch =
|
||||
let
|
||||
systemctl = lib.getExe' systemd "systemctl";
|
||||
in
|
||||
''
|
||||
substituteInPlace source.c \
|
||||
--replace-fail '"systemctl reboot"' '"${systemctl} reboot"' \
|
||||
--replace-fail '"systemctl -i poweroff"' '"${systemctl} -i poweroff"' \
|
||||
--replace-fail '"systemctl suspend"' '"${systemctl} suspend"'
|
||||
'';
|
||||
|
||||
passthru.tests.testModule = gtklock.testModule finalAttrs.finalPackage;
|
||||
|
||||
meta = {
|
||||
|
||||
Reference in New Issue
Block a user