File tree Expand file tree Collapse file tree 1 file changed +47
-0
lines changed
pkgs/by-name/sy/systemd-lock-handler Expand file tree Collapse file tree 1 file changed +47
-0
lines changed Original file line number Diff line number Diff line change 1+ { lib
2+ , fetchFromSourcehut
3+ , buildGoModule
4+ , nix-update-script
5+ } :
6+
7+ buildGoModule rec {
8+ pname = "systemd-lock-handler" ;
9+ version = "2.4.2" ;
10+
11+ src = fetchFromSourcehut {
12+ owner = "~whynothugo" ;
13+ repo = "systemd-lock-handler" ;
14+ rev = "v${ version } " ;
15+ hash = "sha256-sTVAabwWtyvHuDp/+8FKNbfej1x/egoa9z1jLIMJuBg=" ;
16+ } ;
17+
18+ vendorHash = "sha256-dWzojV3tDA5lLdpAQNC9NaADGyvV7dNOS3x8mfgNNtA=" ;
19+
20+ passthru . updateScript = nix-update-script { } ;
21+
22+ # The Makefile expects to find the binary in the source root. Make
23+ # the one built by `buildGoModule` available so that `make install`
24+ # doesn’t try to build it again.
25+ postBuild = ''
26+ cp -a $GOPATH/bin/* .
27+ '' ;
28+
29+ installPhase = ''
30+ runHook preInstall
31+
32+ substituteInPlace systemd-lock-handler.service \
33+ --replace /usr/lib/ $out/lib/
34+
35+ make install DESTDIR= PREFIX=$out
36+
37+ runHook postInstall
38+ '' ;
39+
40+ meta = with lib ; {
41+ homepage = "https://git.sr.ht/~whynothugo/systemd-lock-handler" ;
42+ description = "Translates systemd-system lock/sleep signals into systemd-user target activations" ;
43+ license = licenses . isc ;
44+ maintainers = with maintainers ; [ liff ] ;
45+ platforms = platforms . linux ;
46+ } ;
47+ }
You can’t perform that action at this time.
0 commit comments