summary refs log tree commit diff
path: root/pkgs/development/compilers/llvm/3.5/llvm.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/compilers/llvm/3.5/llvm.nix')
-rw-r--r--pkgs/development/compilers/llvm/3.5/llvm.nix6
1 files changed, 6 insertions, 0 deletions
diff --git a/pkgs/development/compilers/llvm/3.5/llvm.nix b/pkgs/development/compilers/llvm/3.5/llvm.nix
index 0be3af192b42..94f39183345f 100644
--- a/pkgs/development/compilers/llvm/3.5/llvm.nix
+++ b/pkgs/development/compilers/llvm/3.5/llvm.nix
@@ -33,6 +33,12 @@ in stdenv.mkDerivation rec {
 
   propagatedBuildInputs = [ ncurses zlib ];
 
+  prePatch = ''
+    substituteInPlace CMakeLists.txt \
+      --replace 'set(CMAKE_INSTALL_NAME_DIR "@rpath")' "set(CMAKE_INSTALL_NAME_DIR "$out/lib")" \
+      --replace 'set(CMAKE_INSTALL_RPATH "@executable_path/../lib")' ""
+  '';
+
   # hacky fix: created binaries need to be run before installation
   preBuild = ''
     mkdir -p $out/