From 732c6d245bb6a0cd041f62bee09d7c15acbad490 Mon Sep 17 00:00:00 2001 From: Reed Date: Thu, 21 Mar 2024 18:35:10 -0400 Subject: i3lock-fancy: unstable-2018-11-25 -> unstable-2023-04-28 --- .../applications/window-managers/i3/lock-fancy.nix | 59 +++++++++++++--------- 1 file changed, 36 insertions(+), 23 deletions(-) diff --git a/pkgs/applications/window-managers/i3/lock-fancy.nix b/pkgs/applications/window-managers/i3/lock-fancy.nix index f3963b43b54af..7983cc135c143 100644 --- a/pkgs/applications/window-managers/i3/lock-fancy.nix +++ b/pkgs/applications/window-managers/i3/lock-fancy.nix @@ -1,54 +1,67 @@ -{ lib -, stdenv +{ coreutils , fetchFromGitHub -, coreutils -, scrot -, imagemagick +, fontconfig , gawk -, i3lock-color , getopt -, fontconfig +, i3lock-color +, imagemagick +, installShellFiles +, lib +, makeWrapper +, scrot +, stdenv + +, screenshotCommand ? "" }: -stdenv.mkDerivation rec { +stdenv.mkDerivation { pname = "i3lock-fancy"; - version = "unstable-2018-11-25"; + version = "unstable-2023-04-28"; src = fetchFromGitHub { owner = "meskarune"; repo = "i3lock-fancy"; - rev = "7accfb2aa2f918d1a3ab975b860df1693d20a81a"; - sha256 = "00lqsvz1knb8iqy8lnkn3sf4c2c4nzb0smky63qf48m8za5aw9b1"; + rev = "55f5c30071403faf5ae4363a54b6d1f63876d5ce"; + hash = "sha256-ISymKlxLE4/ChDiyjnavFx4T5hEVI62cCxYLWrWiHrg="; }; + nativeBuildInputs = [ + makeWrapper + installShellFiles + ]; + postPatch = '' sed -i i3lock-fancy \ - -e "s|mktemp|${coreutils}/bin/mktemp|" \ - -e "s|'rm -f |'${coreutils}/bin/rm -f |" \ - -e "s|scrot -z |${scrot}/bin/scrot -z |" \ - -e "s|convert |${imagemagick.out}/bin/convert |" \ - -e "s|awk -F|${gawk}/bin/awk -F|" \ - -e "s| awk | ${gawk}/bin/awk |" \ - -e "s|i3lock -i |${i3lock-color}/bin/i3lock-color -i |" \ -e 's|icon="/usr/share/i3lock-fancy/icons/lockdark.png"|icon="'$out'/share/i3lock-fancy/icons/lockdark.png"|' \ - -e 's|icon="/usr/share/i3lock-fancy/icons/lock.png"|icon="'$out'/share/i3lock-fancy/icons/lock.png"|' \ - -e "s|getopt |${getopt}/bin/getopt |" \ - -e "s|fc-match |${fontconfig.bin}/bin/fc-match |" \ - -e "s|shot=(import -window root)|shot=(${scrot}/bin/scrot -z -o)|" + -e 's|icon="/usr/share/i3lock-fancy/icons/lock.png"|icon="'$out'/share/i3lock-fancy/icons/lock.png"|' rm Makefile + '' + lib.optionalString (screenshotCommand != "") '' + sed -i i3lock-fancy \ + -e "s|shot=(import -silent -window root)|shot=(${screenshotCommand})|"; ''; installPhase = '' + runHook preInstall + mkdir -p $out/bin $out/share/i3lock-fancy/icons cp i3lock-fancy $out/bin/i3lock-fancy ln -s $out/bin/i3lock-fancy $out/bin/i3lock cp icons/lock*.png $out/share/i3lock-fancy/icons + installManPage doc/i3lock-fancy.1 + + runHook postInstall + ''; + + postInstall = '' + wrapProgram $out/bin/i3lock-fancy \ + --prefix PATH : ${lib.makeBinPath [ coreutils fontconfig gawk getopt i3lock-color imagemagick scrot ]} ''; meta = with 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; [ ]; + maintainers = [ ]; + mainProgram = "i3lock-fancy"; license = licenses.mit; platforms = platforms.linux; }; -- cgit 1.4.1 From 5e9ce01f9b583b4deee3994072c5f7d5a16e1b77 Mon Sep 17 00:00:00 2001 From: reedrw Date: Fri, 5 Apr 2024 11:48:23 -0400 Subject: i3lock-fancy: add reedrw as maintainer --- pkgs/applications/window-managers/i3/lock-fancy.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/applications/window-managers/i3/lock-fancy.nix b/pkgs/applications/window-managers/i3/lock-fancy.nix index 7983cc135c143..a66e52bc40b0d 100644 --- a/pkgs/applications/window-managers/i3/lock-fancy.nix +++ b/pkgs/applications/window-managers/i3/lock-fancy.nix @@ -60,7 +60,7 @@ stdenv.mkDerivation { meta = with 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 = [ ]; + maintainers = [ maintainers.reedrw ]; mainProgram = "i3lock-fancy"; license = licenses.mit; platforms = platforms.linux; -- cgit 1.4.1