From 41d1adec693b8bac8155a128fb70cf1d45bb09e7 Mon Sep 17 00:00:00 2001 From: Mario Rodas Date: Sun, 7 Apr 2024 04:20:00 +0000 Subject: [PATCH] fzf: remove perl dependency Since fzf 0.43.0, the history command only uses Perl if it's installed otherwise uses Awk [1]. [1] https://github.com/junegunn/fzf/commit/9f7684f6fe7a7889d1ebaded03b446c007d605ea --- pkgs/tools/misc/fzf/default.nix | 24 +++--------------------- 1 file changed, 3 insertions(+), 21 deletions(-) diff --git a/pkgs/tools/misc/fzf/default.nix b/pkgs/tools/misc/fzf/default.nix index 28ba5b1be3eb..94ec13ead9e4 100644 --- a/pkgs/tools/misc/fzf/default.nix +++ b/pkgs/tools/misc/fzf/default.nix @@ -1,26 +1,13 @@ -{ stdenv -, lib +{ lib , buildGoModule , fetchFromGitHub -, writeShellScriptBin , installShellFiles , bc , ncurses -, perl , testers , fzf }: -let - # on Linux, wrap perl in the bash completion scripts with the glibc locales, - # so that using the shell completion (ctrl+r, etc) doesn't result in ugly - # warnings on non-nixos machines - ourPerl = if !stdenv.isLinux then perl else ( - writeShellScriptBin "perl" '' - export PERL_BADLANG=0 - exec ${perl}/bin/perl "$@" - ''); -in buildGoModule rec { pname = "fzf"; version = "0.49.0"; @@ -55,14 +42,9 @@ buildGoModule rec { exit 1 fi - # Has a sneaky dependency on perl - # Include first args to make sure we're patching the right thing - substituteInPlace shell/key-bindings.bash \ - --replace "command -v perl" "command -v ${ourPerl}/bin/perl" \ - --replace " perl -n " " ${ourPerl}/bin/perl -n " # fzf-tmux depends on bc - substituteInPlace bin/fzf-tmux \ - --replace "bc" "${bc}/bin/bc" + substituteInPlace bin/fzf-tmux \ + --replace "bc" "${bc}/bin/bc" ''; postInstall = ''