2016-05-15 05:46:50 +02:00
|
|
|
{ stdenv, fetchFromGitHub, coreutils, scrot, imagemagick, gawk
|
2016-08-07 03:42:43 +02:00
|
|
|
, i3lock-color, getopt, fontconfig
|
2016-05-15 05:46:50 +02:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2018-01-22 21:53:36 +01:00
|
|
|
rev = "3734fba160166006521e513f5734eb76ac6aa48f";
|
|
|
|
name = "i3lock-fancy-unstable-2017-12-14_rev${builtins.substring 0 7 rev}";
|
2016-05-15 05:46:50 +02:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "meskarune";
|
|
|
|
repo = "i3lock-fancy";
|
|
|
|
inherit rev;
|
2018-01-22 21:53:36 +01:00
|
|
|
sha256 = "1bg4xds2hmbq8rp6azbdqvgp1aaq5y1bp05cfwqqm6y3sjw7ywzl";
|
2016-05-15 05:46:50 +02:00
|
|
|
};
|
|
|
|
patchPhase = ''
|
2016-05-24 12:38:23 +02:00
|
|
|
sed -i -e "s|(mktemp)|(${coreutils}/bin/mktemp)|" lock
|
|
|
|
sed -i -e "s|'rm -f |'${coreutils}/bin/rm -f |" lock
|
|
|
|
sed -i -e "s|scrot -z |${scrot}/bin/scrot -z |" lock
|
2016-05-22 13:41:15 +02:00
|
|
|
sed -i -e "s|convert |${imagemagick.out}/bin/convert |" lock
|
2016-05-24 12:38:23 +02:00
|
|
|
sed -i -e "s|awk -F|${gawk}/bin/awk -F|" lock
|
|
|
|
sed -i -e "s| awk | ${gawk}/bin/awk |" lock
|
2018-01-22 21:53:36 +01:00
|
|
|
sed -i -e "s|i3lock -i |${i3lock-color}/bin/i3lock-color -i |" lock
|
|
|
|
sed -i -e 's|icon="$scriptpath/icons/lockdark.png"|icon="'$out'/share/i3lock-fancy/icons/lockdark.png"|' lock
|
|
|
|
sed -i -e 's|icon="$scriptpath/icons/lock.png"|icon="'$out'/share/i3lock-fancy/icons/lock.png"|' lock
|
2016-08-07 03:42:43 +02:00
|
|
|
sed -i -e "s|getopt |${getopt}/bin/getopt |" lock
|
|
|
|
sed -i -e "s|fc-match |${fontconfig.bin}/bin/fc-match |" lock
|
2018-01-22 21:53:36 +01:00
|
|
|
sed -i -e "s|shot=(import -window root)|shot=(${scrot}/bin/scrot -z)|" lock
|
2016-05-15 05:46:50 +02:00
|
|
|
'';
|
|
|
|
installPhase = ''
|
2016-10-15 05:17:35 +02:00
|
|
|
mkdir -p $out/bin $out/share/i3lock-fancy/icons
|
2016-05-15 05:46:50 +02:00
|
|
|
cp lock $out/bin/i3lock-fancy
|
2016-10-15 05:17:35 +02:00
|
|
|
cp icons/lock*.png $out/share/i3lock-fancy/icons
|
2016-05-15 05:46:50 +02:00
|
|
|
'';
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "i3lock is a bash script that takes a screenshot of the desktop, blurs the background and adds a lock icon and text.";
|
|
|
|
homepage = https://github.com/meskarune/i3lock-fancy;
|
|
|
|
maintainers = with maintainers; [ garbas ];
|
|
|
|
license = licenses.mit;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|