summary refs log tree commit diff
diff options
context:
space:
mode:
authorWill Dietz <w@wdtz.org>2018-02-02 06:30:09 -0600
committerWill Dietz <w@wdtz.org>2018-02-02 06:30:09 -0600
commit64e4c98a7f3a04d9d52a9d477dafc9fe2cc9798c (patch)
tree34f3bf6d67233e3d4d21d9bb2a102afc7edeab37
parent2fb4606f38deefa76da5d853645739f2faa315de (diff)
downloadnixlib-64e4c98a7f3a04d9d52a9d477dafc9fe2cc9798c.tar
nixlib-64e4c98a7f3a04d9d52a9d477dafc9fe2cc9798c.tar.gz
nixlib-64e4c98a7f3a04d9d52a9d477dafc9fe2cc9798c.tar.bz2
nixlib-64e4c98a7f3a04d9d52a9d477dafc9fe2cc9798c.tar.lz
nixlib-64e4c98a7f3a04d9d52a9d477dafc9fe2cc9798c.tar.xz
nixlib-64e4c98a7f3a04d9d52a9d477dafc9fe2cc9798c.tar.zst
nixlib-64e4c98a7f3a04d9d52a9d477dafc9fe2cc9798c.zip
llvm-5: add extra 'python' output for opt-viewer tool
-rw-r--r--pkgs/development/compilers/llvm/5/llvm.nix8
1 files changed, 6 insertions, 2 deletions
diff --git a/pkgs/development/compilers/llvm/5/llvm.nix b/pkgs/development/compilers/llvm/5/llvm.nix
index 1f55e6c54e7d..1067fa886bcb 100644
--- a/pkgs/development/compilers/llvm/5/llvm.nix
+++ b/pkgs/development/compilers/llvm/5/llvm.nix
@@ -36,7 +36,7 @@ in stdenv.mkDerivation (rec {
     mv compiler-rt-* $sourceRoot/projects/compiler-rt
   '';
 
-  outputs = [ "out" ]
+  outputs = [ "out" "python" ]
     ++ stdenv.lib.optional enableSharedLibraries "lib";
 
   nativeBuildInputs = [ cmake python ]
@@ -120,7 +120,11 @@ in stdenv.mkDerivation (rec {
     export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PWD/lib
   '';
 
-  postInstall = stdenv.lib.optionalString enableSharedLibraries ''
+  postInstall = ''
+    mkdir -p $python/share
+    mv $out/share/opt-viewer $python/share/opt-viewer
+  ''
+  + stdenv.lib.optionalString enableSharedLibraries ''
     moveToOutput "lib/libLLVM-*" "$lib"
     moveToOutput "lib/libLLVM${stdenv.hostPlatform.extensions.sharedLibrary}" "$lib"
     substituteInPlace "$out/lib/cmake/llvm/LLVMExports-${if debugVersion then "debug" else "release"}.cmake" \