Files
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

53 lines
1.2 KiB
Nix

{
lib,
stdenv,
fetchFromGitHub,
meson,
ninja,
pkg-config,
gtk3,
gtklock,
systemd,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "gtklock-powerbar-module";
version = "4.0.0";
src = fetchFromGitHub {
owner = "jovanlanik";
repo = "gtklock-powerbar-module";
rev = "v${finalAttrs.version}";
hash = "sha256-Zakdta1i0o7S2AbHydlonnh5OMGVgGjB2H/AiHgQT9A=";
};
nativeBuildInputs = [
meson
ninja
pkg-config
];
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 = {
description = "Gtklock module adding power controls to the lockscreen";
homepage = "https://github.com/jovanlanik/gtklock-powerbar-module";
license = lib.licenses.gpl3Only;
maintainers = with lib.maintainers; [ aleksana ];
platforms = lib.platforms.linux;
};
})