2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, coreutils, scrot, imagemagick, gawk
|
2016-08-07 02:42:43 +01:00
|
|
|
, i3lock-color, getopt, fontconfig
|
2016-05-15 04:46:50 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-01-26 03:27:26 +00:00
|
|
|
rev = "7accfb2aa2f918d1a3ab975b860df1693d20a81a";
|
|
|
|
name = "i3lock-fancy-unstable-2018-11-25_rev${builtins.substring 0 7 rev}";
|
2016-05-15 04:46:50 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "meskarune";
|
|
|
|
repo = "i3lock-fancy";
|
|
|
|
inherit rev;
|
2019-01-26 03:27:26 +00:00
|
|
|
sha256 = "00lqsvz1knb8iqy8lnkn3sf4c2c4nzb0smky63qf48m8za5aw9b1";
|
2016-05-15 04:46:50 +01:00
|
|
|
};
|
|
|
|
patchPhase = ''
|
2020-03-22 02:55:03 +00:00
|
|
|
sed -i -e "s|mktemp|${coreutils}/bin/mktemp|" i3lock-fancy
|
2019-01-26 03:27:26 +00:00
|
|
|
sed -i -e "s|'rm -f |'${coreutils}/bin/rm -f |" i3lock-fancy
|
|
|
|
sed -i -e "s|scrot -z |${scrot}/bin/scrot -z |" i3lock-fancy
|
|
|
|
sed -i -e "s|convert |${imagemagick.out}/bin/convert |" i3lock-fancy
|
|
|
|
sed -i -e "s|awk -F|${gawk}/bin/awk -F|" i3lock-fancy
|
|
|
|
sed -i -e "s| awk | ${gawk}/bin/awk |" i3lock-fancy
|
|
|
|
sed -i -e "s|i3lock -i |${i3lock-color}/bin/i3lock-color -i |" i3lock-fancy
|
|
|
|
sed -i -e 's|icon="/usr/share/i3lock-fancy/icons/lockdark.png"|icon="'$out'/share/i3lock-fancy/icons/lockdark.png"|' i3lock-fancy
|
|
|
|
sed -i -e 's|icon="/usr/share/i3lock-fancy/icons/lock.png"|icon="'$out'/share/i3lock-fancy/icons/lock.png"|' i3lock-fancy
|
|
|
|
sed -i -e "s|getopt |${getopt}/bin/getopt |" i3lock-fancy
|
|
|
|
sed -i -e "s|fc-match |${fontconfig.bin}/bin/fc-match |" i3lock-fancy
|
2019-08-31 13:19:39 +01:00
|
|
|
sed -i -e "s|shot=(import -window root)|shot=(${scrot}/bin/scrot -z -o)|" i3lock-fancy
|
2019-01-26 03:27:26 +00:00
|
|
|
rm Makefile
|
2016-05-15 04:46:50 +01:00
|
|
|
'';
|
|
|
|
installPhase = ''
|
2016-10-15 04:17:35 +01:00
|
|
|
mkdir -p $out/bin $out/share/i3lock-fancy/icons
|
2019-01-26 03:27:26 +00:00
|
|
|
cp i3lock-fancy $out/bin/i3lock-fancy
|
2016-10-15 04:17:35 +01:00
|
|
|
cp icons/lock*.png $out/share/i3lock-fancy/icons
|
2016-05-15 04:46:50 +01:00
|
|
|
'';
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-10-11 06:55:05 +01: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-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/meskarune/i3lock-fancy";
|
2019-07-03 10:27:39 +01:00
|
|
|
maintainers = with maintainers; [ ];
|
2016-05-15 04:46:50 +01:00
|
|
|
license = licenses.mit;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|