From 0eddd4230678fc2c880c60b2fe530387db8798ac Mon Sep 17 00:00:00 2001 From: Daiderd Jordan Date: Wed, 14 Sep 2016 22:29:08 +0200 Subject: [PATCH] fzf: fix cycle in bin output --- pkgs/tools/misc/fzf/default.nix | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/pkgs/tools/misc/fzf/default.nix b/pkgs/tools/misc/fzf/default.nix index 3eaf5ae5d1b3..fb0d555b7708 100644 --- a/pkgs/tools/misc/fzf/default.nix +++ b/pkgs/tools/misc/fzf/default.nix @@ -23,12 +23,19 @@ buildGoPackage rec { sed -i -e "s|expand(':h:h').'/bin/fzf-tmux'|'$bin/bin/fzf-tmux'|" plugin/fzf.vim ''; - postInstall= '' + postInstall = '' cp $src/bin/fzf-tmux $bin/bin mkdir -p $out/share/vim-plugins ln -s $out/share/go/src/github.com/junegunn/fzf $out/share/vim-plugins/${name} ''; + preFixup = stdenv.lib.optionalString stdenv.isDarwin '' + # fixes cycle between $out and $bin + # otool -l shows that the binary includes an LC_RPATH to $out/lib + # it seems safe to remove that since but the directory does not exist. + install_name_tool -delete_rpath $out/lib $bin/bin/fzf + ''; + meta = with stdenv.lib; { homepage = https://github.com/junegunn/fzf; description = "A command-line fuzzy finder written in Go";