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