Merge pull request #53539 from matthewbauer/darwin-fixes4
Fixes for recent darwin changes
commit3cfdf8eb239637bdb89c443c60f5e0c9443bbf02
authorMatthew Bauer <mjbauer95@gmail.com>
dateMon 7 Jan 2019, 15:44 (8 years ago)
parentcecec1fed61487
pkgs/development/compilers/llvm/3.8/llvm.nix+1−1
@@ -49,7 +49,7 @@ in stdenv.mkDerivation rec {
4949 sed -i 's/os_trace(\(.*\)");$/printf(\1\\n");/g' ./projects/compiler-rt/lib/sanitizer_common/sanitizer_mac.cc
5050
5151 substituteInPlace CMakeLists.txt \
52− --replace 'set(_install_name_dir INSTALL_NAME_DIR "@rpath")' "set(_install_name_dir)" \
52+ --replace 'set(CMAKE_INSTALL_NAME_DIR "@rpath")' "set(CMAKE_INSTALL_NAME_DIR "$out/lib")" \
5353 --replace 'set(CMAKE_INSTALL_RPATH "@executable_path/../lib")' ""
5454 ''
5555 + ''
pkgs/development/compilers/llvm/3.9/llvm.nix+1−1
@@ -82,7 +82,7 @@ in stdenv.mkDerivation rec {
8282 --replace 'set(COMPILER_RT_HAS_TSAN TRUE)' 'set(COMPILER_RT_HAS_TSAN FALSE)'
8383
8484 substituteInPlace CMakeLists.txt \
85− --replace 'set(_install_name_dir INSTALL_NAME_DIR "@rpath")' "set(_install_name_dir)" \
85+ --replace 'set(CMAKE_INSTALL_NAME_DIR "@rpath")' "set(CMAKE_INSTALL_NAME_DIR "$lib/lib")" \
8686 --replace 'set(CMAKE_INSTALL_RPATH "@executable_path/../lib")' ""
8787 ''
8888 # Patch llvm-config to return correct library path based on --link-{shared,static}.
pkgs/os-specific/darwin/apple-source-releases/adv_cmds/xcode.nix+2−1
@@ -16,7 +16,8 @@ appleDerivation {
1616 substituteInPlace adv_cmds.xcodeproj/project.pbxproj \
1717 --replace "FD201DC214369B4200906237 /* pkill.c in Sources */," "" \
1818 --replace "FDF278D60FC6204E00D7A3C6 /* locale.cc in Sources */," "" \
19− --replace '/usr/lib/libtermcap.dylib' 'libncurses.dylib'
19+ --replace '/usr/lib/libtermcap.dylib' 'libncurses.dylib' \
20+ --replace 'DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";' ""
2021 '';
2122
2223 buildPhase = ''
pkgs/os-specific/darwin/apple-source-releases/diskdev_cmds/default.nix+4−2
@@ -18,14 +18,16 @@ appleDerivation {
1818 cp xnu-*/bsd/i386/disklabel.h i386
1919 cp -r xnu-*/bsd/sys System
2020 cp -r Libc-*/uuid System
21+ substituteInPlace diskdev_cmds.xcodeproj/project.pbxproj \
22+ --replace 'DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";' ""
2123 '';
2224 installPhase = ''
2325 install -D Products/Release/libdisk.a $out/lib/libdisk.a
2426 rm Products/Release/libdisk.a
2527 for f in Products/Release/*; do
2628 if [ -f $f ]; then
27− install -D $file $out/bin/$(basename $f)
28− done
29+ install -D $f $out/bin/$(basename $f)
30+ fi
2931 done
3032 '';
3133
pkgs/os-specific/darwin/apple-source-releases/file_cmds/default.nix+2−2
@@ -21,8 +21,8 @@ appleDerivation rec {
2121 installPhase = ''
2222 for f in Products/Release/*; do
2323 if [ -f $f ]; then
24− install -D $file $out/bin/$(basename $f)
25− done
24+ install -D $f $out/bin/$(basename $f)
25+ fi
2626 done
2727
2828 for n in 1; do
pkgs/os-specific/darwin/apple-source-releases/network_cmds/default.nix+1−1
@@ -22,7 +22,7 @@ appleDerivation rec {
2222 installPhase = ''
2323 for f in Products/Release/*; do
2424 if [ -f $f ]; then
25− install -D $file $out/bin/$(basename $f)
25+ install -D $f $out/bin/$(basename $f)
2626 fi
2727 done
2828
pkgs/os-specific/darwin/insert_dylib/default.nix+1−2
@@ -11,9 +11,8 @@ stdenv.mkDerivation
1111 nativeBuildInputs = [ xcbuildHook ];
1212 installPhase =
1313 ''
14− prog=$(find . -type f -name insert_dylib)
1514 mkdir -p $out/bin
16− install -m755 $prog $out/bin
15+ install -m755 Products/Release/insert_dylib $out/bin
1716 '';
1817 meta.platforms = stdenv.lib.platforms.darwin;
1918 }
pkgs/stdenv/darwin/make-bootstrap-tools.nix+1−1
@@ -98,7 +98,7 @@ in rec {
9898 cp -d ${xz.out}/lib/liblzma*.* $out/lib
9999
100100 # Copy binutils.
101− for i in as ld ar ranlib nm strip otool install_name_tool dsymutil lipo; do
101+ for i in as ld ar ranlib nm strip otool install_name_tool lipo; do
102102 cp ${cctools_}/bin/$i $out/bin
103103 done
104104