i3/lock-fancy: switch ot pname+version, cleanup postPatch

+20 -16
+20 -16
pkgs/applications/window-managers/i3/lock-fancy.nix
··· 11 11 }: 12 12 13 13 stdenv.mkDerivation rec { 14 - rev = "7accfb2aa2f918d1a3ab975b860df1693d20a81a"; 15 14 pname = "i3lock-fancy"; 16 - version = "unstable-2018-11-25_rev${builtins.substring 0 7 rev}"; 15 + version = "unstable-2018-11-25"; 16 + 17 17 src = fetchFromGitHub { 18 18 owner = "meskarune"; 19 19 repo = "i3lock-fancy"; 20 - inherit rev; 20 + rev = "7accfb2aa2f918d1a3ab975b860df1693d20a81a"; 21 21 sha256 = "00lqsvz1knb8iqy8lnkn3sf4c2c4nzb0smky63qf48m8za5aw9b1"; 22 22 }; 23 - patchPhase = '' 24 - sed -i -e "s|mktemp|${coreutils}/bin/mktemp|" i3lock-fancy 25 - sed -i -e "s|'rm -f |'${coreutils}/bin/rm -f |" i3lock-fancy 26 - sed -i -e "s|scrot -z |${scrot}/bin/scrot -z |" i3lock-fancy 27 - sed -i -e "s|convert |${imagemagick.out}/bin/convert |" i3lock-fancy 28 - sed -i -e "s|awk -F|${gawk}/bin/awk -F|" i3lock-fancy 29 - sed -i -e "s| awk | ${gawk}/bin/awk |" i3lock-fancy 30 - sed -i -e "s|i3lock -i |${i3lock-color}/bin/i3lock-color -i |" i3lock-fancy 31 - sed -i -e 's|icon="/usr/share/i3lock-fancy/icons/lockdark.png"|icon="'$out'/share/i3lock-fancy/icons/lockdark.png"|' i3lock-fancy 32 - sed -i -e 's|icon="/usr/share/i3lock-fancy/icons/lock.png"|icon="'$out'/share/i3lock-fancy/icons/lock.png"|' i3lock-fancy 33 - sed -i -e "s|getopt |${getopt}/bin/getopt |" i3lock-fancy 34 - sed -i -e "s|fc-match |${fontconfig.bin}/bin/fc-match |" i3lock-fancy 35 - sed -i -e "s|shot=(import -window root)|shot=(${scrot}/bin/scrot -z -o)|" i3lock-fancy 23 + 24 + postPatch = '' 25 + sed -i i3lock-fancy \ 26 + -e "s|mktemp|${coreutils}/bin/mktemp|" \ 27 + -e "s|'rm -f |'${coreutils}/bin/rm -f |" \ 28 + -e "s|scrot -z |${scrot}/bin/scrot -z |" \ 29 + -e "s|convert |${imagemagick.out}/bin/convert |" \ 30 + -e "s|awk -F|${gawk}/bin/awk -F|" \ 31 + -e "s| awk | ${gawk}/bin/awk |" \ 32 + -e "s|i3lock -i |${i3lock-color}/bin/i3lock-color -i |" \ 33 + -e 's|icon="/usr/share/i3lock-fancy/icons/lockdark.png"|icon="'$out'/share/i3lock-fancy/icons/lockdark.png"|' \ 34 + -e 's|icon="/usr/share/i3lock-fancy/icons/lock.png"|icon="'$out'/share/i3lock-fancy/icons/lock.png"|' \ 35 + -e "s|getopt |${getopt}/bin/getopt |" \ 36 + -e "s|fc-match |${fontconfig.bin}/bin/fc-match |" \ 37 + -e "s|shot=(import -window root)|shot=(${scrot}/bin/scrot -z -o)|" 36 38 rm Makefile 37 39 ''; 40 + 38 41 installPhase = '' 39 42 mkdir -p $out/bin $out/share/i3lock-fancy/icons 40 43 cp i3lock-fancy $out/bin/i3lock-fancy 41 44 cp icons/lock*.png $out/share/i3lock-fancy/icons 42 45 ''; 46 + 43 47 meta = with lib; { 44 48 description = "i3lock is a bash script that takes a screenshot of the desktop, blurs the background and adds a lock icon and text"; 45 49 homepage = "https://github.com/meskarune/i3lock-fancy";