1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
|
{ lib
, stdenv
, fetchFromGitHub
, coreutils
, grim
, gawk
, jq
, swaylock
, imagemagick
, getopt
, fontconfig
, wmctrl
, makeWrapper
, bash
}:
let
depsPath = lib.makeBinPath [
coreutils
grim
gawk
jq
swaylock
imagemagick
getopt
fontconfig
wmctrl
];
mainProgram = "swaylock-fancy";
in
stdenv.mkDerivation {
pname = "swaylock-fancy";
version = "unstable-2023-12-22";
src = fetchFromGitHub {
owner = "Big-B";
repo = "swaylock-fancy";
rev = "0b93740e1dfc39883c125c212a1adc16b01c14f1";
hash = "sha256-ko4SeHGNBiPMvxFXhD+U2r0Mwc14C2IN5CaJYI0V8u8=";
};
postPatch = ''
substituteInPlace ${mainProgram} \
--replace "/usr/share" "$out/share"
'';
strictDeps = true;
nativeBuildInputs = [ makeWrapper ];
buildInputs = [ bash ];
makeFlags = [ "PREFIX=${placeholder "out"}" ];
postInstall = ''
wrapProgram $out/bin/${mainProgram} \
--prefix PATH : "${depsPath}"
'';
meta = with lib; {
description = "This is an swaylock bash script that takes a screenshot of the desktop, blurs the background and adds a lock icon and text";
homepage = "https://github.com/Big-B/swaylock-fancy";
license = licenses.mit;
platforms = platforms.linux;
maintainers = with maintainers; [ frogamic ];
inherit mainProgram;
};
}
|