From 1cfed62073a7c4bd7ea70498041ae3f271977ff3 Mon Sep 17 00:00:00 2001 From: Andreas Herrmann Date: Tue, 6 Jun 2017 21:37:23 +0200 Subject: [PATCH] llvm_4: Fix debugVersion Previously failed on installation phase when `substituteInPlace` could not find the cmake exports file. --- pkgs/development/compilers/llvm/4/llvm.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/compilers/llvm/4/llvm.nix b/pkgs/development/compilers/llvm/4/llvm.nix index 1a78d672bfe..c859c7b958d 100644 --- a/pkgs/development/compilers/llvm/4/llvm.nix +++ b/pkgs/development/compilers/llvm/4/llvm.nix @@ -115,11 +115,11 @@ in stdenv.mkDerivation rec { + stdenv.lib.optionalString (enableSharedLibraries) '' moveToOutput "lib/libLLVM-*" "$lib" moveToOutput "lib/libLLVM.${shlib}" "$lib" - substituteInPlace "$out/lib/cmake/llvm/LLVMExports-release.cmake" \ + substituteInPlace "$out/lib/cmake/llvm/LLVMExports-${if debugVersion then "debug" else "release"}.cmake" \ --replace "\''${_IMPORT_PREFIX}/lib/libLLVM-" "$lib/lib/libLLVM-" '' + stdenv.lib.optionalString (stdenv.isDarwin && enableSharedLibraries) '' - substituteInPlace "$out/lib/cmake/llvm/LLVMExports-release.cmake" \ + substituteInPlace "$out/lib/cmake/llvm/LLVMExports-${if debugVersion then "debug" else "release"}.cmake" \ --replace "\''${_IMPORT_PREFIX}/lib/libLLVM.dylib" "$lib/lib/libLLVM.dylib" install_name_tool -id $lib/lib/libLLVM.dylib $lib/lib/libLLVM.dylib install_name_tool -change @rpath/libLLVM.dylib $lib/lib/libLLVM.dylib $out/bin/llvm-config