summary refs log tree commit diff
path: root/pkgs/development/compilers/llvm/6
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2022-08-18 00:10:08 -0400
committerJohn Ericson <John.Ericson@Obsidian.Systems>2022-08-18 00:10:08 -0400
commitdbc5a792a26189e2e610b9736b218d3f5df50ebf (patch)
treebac5f913925ea1c4ede2c9d6193fe7a08f086e0a /pkgs/development/compilers/llvm/6
parent3e43b5e4bc1d80da0a39bf0155357d9bd4495cae (diff)
downloadnixpkgs-dbc5a792a26189e2e610b9736b218d3f5df50ebf.tar
nixpkgs-dbc5a792a26189e2e610b9736b218d3f5df50ebf.tar.gz
nixpkgs-dbc5a792a26189e2e610b9736b218d3f5df50ebf.tar.bz2
nixpkgs-dbc5a792a26189e2e610b9736b218d3f5df50ebf.tar.lz
nixpkgs-dbc5a792a26189e2e610b9736b218d3f5df50ebf.tar.xz
nixpkgs-dbc5a792a26189e2e610b9736b218d3f5df50ebf.tar.zst
nixpkgs-dbc5a792a26189e2e610b9736b218d3f5df50ebf.zip
llvmPackages*.libunwind: Don't redo install phase from scratch
I can't think of any good reason it was the way it was before. I think
CMake can be made to install the headers too, but this is a fine first
step.
Diffstat (limited to 'pkgs/development/compilers/llvm/6')
-rw-r--r--pkgs/development/compilers/llvm/6/libcxxabi/default.nix35
1 files changed, 14 insertions, 21 deletions
diff --git a/pkgs/development/compilers/llvm/6/libcxxabi/default.nix b/pkgs/development/compilers/llvm/6/libcxxabi/default.nix
index 6a03d8a1835..d7de130fbaa 100644
--- a/pkgs/development/compilers/llvm/6/libcxxabi/default.nix
+++ b/pkgs/development/compilers/llvm/6/libcxxabi/default.nix
@@ -25,27 +25,20 @@ stdenv.mkDerivation {
   nativeBuildInputs = [ cmake ];
   buildInputs = lib.optional (!stdenv.isDarwin && !stdenv.isFreeBSD) libunwind;
 
-  installPhase = if stdenv.isDarwin
-    then ''
-      for file in lib/*.dylib; do
-        # this should be done in CMake, but having trouble figuring out
-        # the magic combination of necessary CMake variables
-        # if you fancy a try, take a look at
-        # https://gitlab.kitware.com/cmake/community/-/wikis/doc/cmake/RPATH-handling
-        install_name_tool -id $out/$file $file
-      done
-      make install
-      install -d 755 $out/include
-      install -m 644 ../include/*.h $out/include
-    ''
-    else ''
-      install -d -m 755 $out/include $out/lib
-      install -m 644 lib/libc++abi.a $out/lib
-      install -m 644 lib/libc++abi.so.1.0 $out/lib
-      install -m 644 ../include/cxxabi.h $out/include
-      ln -s libc++abi.so.1.0 $out/lib/libc++abi.so
-      ln -s libc++abi.so.1.0 $out/lib/libc++abi.so.1
-    '';
+  preInstall = lib.optionalString stdenv.isDarwin ''
+    for file in lib/*.dylib; do
+      # this should be done in CMake, but having trouble figuring out
+      # the magic combination of necessary CMake variables
+      # if you fancy a try, take a look at
+      # https://gitlab.kitware.com/cmake/community/-/wikis/doc/cmake/RPATH-handling
+      install_name_tool -id $out/$file $file
+    done
+  '';
+
+  postInstall = ''
+    mkdir -p "$dev/include"
+    install -m 644 ../include/${if stdenv.isDarwin then "*" else "cxxabi.h"} "$dev/include"
+  '';
 
   meta = llvm_meta // {
     homepage = "https://libcxxabi.llvm.org/";