about summary refs log tree commit diff
path: root/pkgs/tools
diff options
context:
space:
mode:
authorDaiderd Jordan <daiderd@gmail.com>2016-09-14 22:29:08 +0200
committerDaiderd Jordan <daiderd@gmail.com>2016-09-16 23:06:50 +0200
commit0eddd4230678fc2c880c60b2fe530387db8798ac (patch)
treebb4dedf3f43d121b76e6148f9bb4bcd649ac5608 /pkgs/tools
parent5ea6d5fa726ec6a443310afc6167e05789eaae66 (diff)
downloadnixlib-0eddd4230678fc2c880c60b2fe530387db8798ac.tar
nixlib-0eddd4230678fc2c880c60b2fe530387db8798ac.tar.gz
nixlib-0eddd4230678fc2c880c60b2fe530387db8798ac.tar.bz2
nixlib-0eddd4230678fc2c880c60b2fe530387db8798ac.tar.lz
nixlib-0eddd4230678fc2c880c60b2fe530387db8798ac.tar.xz
nixlib-0eddd4230678fc2c880c60b2fe530387db8798ac.tar.zst
nixlib-0eddd4230678fc2c880c60b2fe530387db8798ac.zip
fzf: fix cycle in bin output
Diffstat (limited to 'pkgs/tools')
-rw-r--r--pkgs/tools/misc/fzf/default.nix9
1 files changed, 8 insertions, 1 deletions
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('<sfile>: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";