2024-01-02 11:29:13 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, coreutils
|
|
|
|
, grim
|
|
|
|
, gawk
|
|
|
|
, jq
|
|
|
|
, swaylock
|
|
|
|
, imagemagick
|
|
|
|
, getopt
|
|
|
|
, fontconfig
|
|
|
|
, wmctrl
|
|
|
|
, makeWrapper
|
|
|
|
, bash
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
2021-01-17 00:15:33 +00:00
|
|
|
depsPath = lib.makeBinPath [
|
2020-04-24 23:36:52 +00:00
|
|
|
coreutils
|
|
|
|
grim
|
|
|
|
gawk
|
2021-10-17 09:34:42 +00:00
|
|
|
jq
|
2020-04-24 23:36:52 +00:00
|
|
|
swaylock
|
|
|
|
imagemagick
|
|
|
|
getopt
|
|
|
|
fontconfig
|
2021-10-17 09:34:42 +00:00
|
|
|
wmctrl
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
2024-01-02 11:29:13 +00:00
|
|
|
mainProgram = "swaylock-fancy";
|
|
|
|
in
|
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
pname = "swaylock-fancy";
|
2024-01-25 14:12:00 +00:00
|
|
|
version = "unstable-2023-12-22";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Big-B";
|
|
|
|
repo = "swaylock-fancy";
|
2024-01-25 14:12:00 +00:00
|
|
|
rev = "0b93740e1dfc39883c125c212a1adc16b01c14f1";
|
|
|
|
hash = "sha256-ko4SeHGNBiPMvxFXhD+U2r0Mwc14C2IN5CaJYI0V8u8=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
2024-01-02 11:29:13 +00:00
|
|
|
substituteInPlace ${mainProgram} \
|
2020-04-24 23:36:52 +00:00
|
|
|
--replace "/usr/share" "$out/share"
|
|
|
|
'';
|
|
|
|
|
2022-05-18 14:49:53 +00:00
|
|
|
strictDeps = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
2022-05-18 14:49:53 +00:00
|
|
|
buildInputs = [ bash ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
makeFlags = [ "PREFIX=${placeholder "out"}" ];
|
|
|
|
|
|
|
|
postInstall = ''
|
2024-01-02 11:29:13 +00:00
|
|
|
wrapProgram $out/bin/${mainProgram} \
|
2020-04-24 23:36:52 +00:00
|
|
|
--prefix PATH : "${depsPath}"
|
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
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;
|
2024-01-02 11:29:13 +00:00
|
|
|
maintainers = with maintainers; [ frogamic ];
|
|
|
|
inherit mainProgram;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|