Merge pull request #297859 from reedrw/update-i3lock-fancy

i3lock-fancy: unstable-2018-11-25 -> unstable-2023-04-28

authored by Pol Dellaiera and committed by GitHub 8abc48e3 148a0a24

+36 -23
+36 -23
pkgs/applications/window-managers/i3/lock-fancy.nix
··· 1 - { lib 2 - , stdenv 3 , fetchFromGitHub 4 - , coreutils 5 - , scrot 6 - , imagemagick 7 , gawk 8 , i3lock-color 9 - , getopt 10 - , fontconfig 11 }: 12 13 - stdenv.mkDerivation rec { 14 pname = "i3lock-fancy"; 15 - version = "unstable-2018-11-25"; 16 17 src = fetchFromGitHub { 18 owner = "meskarune"; 19 repo = "i3lock-fancy"; 20 - rev = "7accfb2aa2f918d1a3ab975b860df1693d20a81a"; 21 - sha256 = "00lqsvz1knb8iqy8lnkn3sf4c2c4nzb0smky63qf48m8za5aw9b1"; 22 }; 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)|" 38 rm Makefile 39 ''; 40 41 installPhase = '' 42 mkdir -p $out/bin $out/share/i3lock-fancy/icons 43 cp i3lock-fancy $out/bin/i3lock-fancy 44 ln -s $out/bin/i3lock-fancy $out/bin/i3lock 45 cp icons/lock*.png $out/share/i3lock-fancy/icons 46 ''; 47 48 meta = with lib; { 49 description = "i3lock is a bash script that takes a screenshot of the desktop, blurs the background and adds a lock icon and text"; 50 homepage = "https://github.com/meskarune/i3lock-fancy"; 51 - maintainers = with maintainers; [ ]; 52 license = licenses.mit; 53 platforms = platforms.linux; 54 };
··· 1 + { coreutils 2 , fetchFromGitHub 3 + , fontconfig 4 , gawk 5 + , getopt 6 , i3lock-color 7 + , imagemagick 8 + , installShellFiles 9 + , lib 10 + , makeWrapper 11 + , scrot 12 + , stdenv 13 + 14 + , screenshotCommand ? "" 15 }: 16 17 + stdenv.mkDerivation { 18 pname = "i3lock-fancy"; 19 + version = "unstable-2023-04-28"; 20 21 src = fetchFromGitHub { 22 owner = "meskarune"; 23 repo = "i3lock-fancy"; 24 + rev = "55f5c30071403faf5ae4363a54b6d1f63876d5ce"; 25 + hash = "sha256-ISymKlxLE4/ChDiyjnavFx4T5hEVI62cCxYLWrWiHrg="; 26 }; 27 28 + nativeBuildInputs = [ 29 + makeWrapper 30 + installShellFiles 31 + ]; 32 + 33 postPatch = '' 34 sed -i i3lock-fancy \ 35 -e 's|icon="/usr/share/i3lock-fancy/icons/lockdark.png"|icon="'$out'/share/i3lock-fancy/icons/lockdark.png"|' \ 36 + -e 's|icon="/usr/share/i3lock-fancy/icons/lock.png"|icon="'$out'/share/i3lock-fancy/icons/lock.png"|' 37 rm Makefile 38 + '' + lib.optionalString (screenshotCommand != "") '' 39 + sed -i i3lock-fancy \ 40 + -e "s|shot=(import -silent -window root)|shot=(${screenshotCommand})|"; 41 ''; 42 43 installPhase = '' 44 + runHook preInstall 45 + 46 mkdir -p $out/bin $out/share/i3lock-fancy/icons 47 cp i3lock-fancy $out/bin/i3lock-fancy 48 ln -s $out/bin/i3lock-fancy $out/bin/i3lock 49 cp icons/lock*.png $out/share/i3lock-fancy/icons 50 + installManPage doc/i3lock-fancy.1 51 + 52 + runHook postInstall 53 + ''; 54 + 55 + postInstall = '' 56 + wrapProgram $out/bin/i3lock-fancy \ 57 + --prefix PATH : ${lib.makeBinPath [ coreutils fontconfig gawk getopt i3lock-color imagemagick scrot ]} 58 ''; 59 60 meta = with lib; { 61 description = "i3lock is a bash script that takes a screenshot of the desktop, blurs the background and adds a lock icon and text"; 62 homepage = "https://github.com/meskarune/i3lock-fancy"; 63 + maintainers = [ maintainers.reedrw ]; 64 + mainProgram = "i3lock-fancy"; 65 license = licenses.mit; 66 platforms = platforms.linux; 67 };