From 6262935d09f683335d35bbc6413f1fffb50bd5ac Mon Sep 17 00:00:00 2001 From: misuzu Date: Mon, 23 Jan 2023 11:39:54 +0200 Subject: [PATCH] fzf: fix failing test on 32-bit platforms --- pkgs/tools/misc/fzf/default.nix | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/pkgs/tools/misc/fzf/default.nix b/pkgs/tools/misc/fzf/default.nix index 6a29151a5178..8e84b5d6fc7c 100644 --- a/pkgs/tools/misc/fzf/default.nix +++ b/pkgs/tools/misc/fzf/default.nix @@ -2,6 +2,7 @@ , lib , buildGoModule , fetchFromGitHub +, fetchpatch , writeText , writeShellScriptBin , runtimeShell @@ -46,6 +47,16 @@ buildGoModule rec { "-s" "-w" "-X main.version=${version} -X main.revision=${src.rev}" ]; + patches = [ + # fix for test failure on 32-bit platforms + # can be removed in the next release of fzf + # https://github.com/junegunn/fzf/issues/3127 + (fetchpatch { + url = "https://github.com/junegunn/fzf/commit/aa7361337d3f78ae1e32283ba395446025323abb.patch"; + hash = "sha256-ZmBdJa7eq9f58f2pL7QrtDSApkQJQBH/Em12J5xk3Q4="; + }) + ]; + # The vim plugin expects a relative path to the binary; patch it to abspath. postPatch = '' sed -i -e "s|expand(':h:h')|'$out'|" plugin/fzf.vim