2021-12-06 16:07:01 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, coreutils
|
|
|
|
, scrot
|
|
|
|
, imagemagick
|
|
|
|
, gawk
|
|
|
|
, i3lock-color
|
|
|
|
, getopt
|
|
|
|
, fontconfig
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2021-12-06 16:07:01 +00:00
|
|
|
pname = "i3lock-fancy";
|
|
|
|
version = "unstable-2018-11-25";
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "meskarune";
|
|
|
|
repo = "i3lock-fancy";
|
2021-12-06 16:07:01 +00:00
|
|
|
rev = "7accfb2aa2f918d1a3ab975b860df1693d20a81a";
|
2020-04-24 23:36:52 +00:00
|
|
|
sha256 = "00lqsvz1knb8iqy8lnkn3sf4c2c4nzb0smky63qf48m8za5aw9b1";
|
|
|
|
};
|
2021-12-06 16:07:01 +00:00
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
sed -i i3lock-fancy \
|
|
|
|
-e "s|mktemp|${coreutils}/bin/mktemp|" \
|
|
|
|
-e "s|'rm -f |'${coreutils}/bin/rm -f |" \
|
|
|
|
-e "s|scrot -z |${scrot}/bin/scrot -z |" \
|
|
|
|
-e "s|convert |${imagemagick.out}/bin/convert |" \
|
|
|
|
-e "s|awk -F|${gawk}/bin/awk -F|" \
|
|
|
|
-e "s| awk | ${gawk}/bin/awk |" \
|
|
|
|
-e "s|i3lock -i |${i3lock-color}/bin/i3lock-color -i |" \
|
|
|
|
-e 's|icon="/usr/share/i3lock-fancy/icons/lockdark.png"|icon="'$out'/share/i3lock-fancy/icons/lockdark.png"|' \
|
|
|
|
-e 's|icon="/usr/share/i3lock-fancy/icons/lock.png"|icon="'$out'/share/i3lock-fancy/icons/lock.png"|' \
|
|
|
|
-e "s|getopt |${getopt}/bin/getopt |" \
|
|
|
|
-e "s|fc-match |${fontconfig.bin}/bin/fc-match |" \
|
|
|
|
-e "s|shot=(import -window root)|shot=(${scrot}/bin/scrot -z -o)|"
|
2020-04-24 23:36:52 +00:00
|
|
|
rm Makefile
|
|
|
|
'';
|
2021-12-06 16:07:01 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin $out/share/i3lock-fancy/icons
|
|
|
|
cp i3lock-fancy $out/bin/i3lock-fancy
|
2022-12-28 21:21:41 +00:00
|
|
|
ln -s $out/bin/i3lock-fancy $out/bin/i3lock
|
2020-04-24 23:36:52 +00:00
|
|
|
cp icons/lock*.png $out/share/i3lock-fancy/icons
|
|
|
|
'';
|
2021-12-06 16:07:01 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-10-19 00:13:06 +00:00
|
|
|
description = "i3lock is a bash script that takes a screenshot of the desktop, blurs the background and adds a lock icon and text";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/meskarune/i3lock-fancy";
|
|
|
|
maintainers = with maintainers; [ ];
|
|
|
|
license = licenses.mit;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|