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
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{
lib,
fetchFromSourcehut,
buildGoModule,
nix-update-script,
nixosTests,
}:
buildGoModule rec {
pname = "systemd-lock-handler";
version = "2.4.2";
src = fetchFromSourcehut {
owner = "~whynothugo";
repo = "systemd-lock-handler";
rev = "v${version}";
hash = "sha256-sTVAabwWtyvHuDp/+8FKNbfej1x/egoa9z1jLIMJuBg=";
};
vendorHash = "sha256-dWzojV3tDA5lLdpAQNC9NaADGyvV7dNOS3x8mfgNNtA=";
passthru = {
updateScript = nix-update-script { };
tests = nixosTests.systemd-lock-handler;
};
# The Makefile expects to find the binary in the source root. Make
# the one built by `buildGoModule` available so that `make install`
# doesnt try to build it again.
postBuild = ''
cp -a $GOPATH/bin/* .
'';
installPhase = ''
runHook preInstall
substituteInPlace systemd-lock-handler.service \
--replace /usr/lib/ $out/lib/
make install DESTDIR= PREFIX=$out
runHook postInstall
'';
meta = with lib; {
homepage = "https://git.sr.ht/~whynothugo/systemd-lock-handler";
description = "Translates systemd-system lock/sleep signals into systemd-user target activations";
license = licenses.isc;
maintainers = with maintainers; [ liff ];
platforms = platforms.linux;
};
}