summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorDaiderd Jordan <daiderd@gmail.com>2017-11-21 19:43:44 +0100
committerDaiderd Jordan <daiderd@gmail.com>2017-11-21 23:15:00 +0100
commita0948ffdb04ebf6376caca9a007e381065895a0f (patch)
treed707c76a85ee520cadff89f0fa40efaa0a094d19 /pkgs
parent72cf3e856a971526c41e28370653abe63c054f84 (diff)
downloadnixpkgs-a0948ffdb04ebf6376caca9a007e381065895a0f.tar
nixpkgs-a0948ffdb04ebf6376caca9a007e381065895a0f.tar.gz
nixpkgs-a0948ffdb04ebf6376caca9a007e381065895a0f.tar.bz2
nixpkgs-a0948ffdb04ebf6376caca9a007e381065895a0f.tar.lz
nixpkgs-a0948ffdb04ebf6376caca9a007e381065895a0f.tar.xz
nixpkgs-a0948ffdb04ebf6376caca9a007e381065895a0f.tar.zst
nixpkgs-a0948ffdb04ebf6376caca9a007e381065895a0f.zip
Csu: fix build with CoreFoundation
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/os-specific/darwin/apple-source-releases/Csu/default.nix28
1 files changed, 13 insertions, 15 deletions
diff --git a/pkgs/os-specific/darwin/apple-source-releases/Csu/default.nix b/pkgs/os-specific/darwin/apple-source-releases/Csu/default.nix
index 8dcf28a5909..7fd32a64fe5 100644
--- a/pkgs/os-specific/darwin/apple-source-releases/Csu/default.nix
+++ b/pkgs/os-specific/darwin/apple-source-releases/Csu/default.nix
@@ -1,25 +1,23 @@
 { stdenv, appleDerivation }:
 
 appleDerivation {
-  postUnpack = ''
-    substituteInPlace $sourceRoot/Makefile \
-      --replace "/usr/lib" "/lib" \
-      --replace "/usr/local/lib" "/lib" \
-      --replace "/usr/bin" "" \
-      --replace "/bin/" "" \
+  prePatch = ''
+    substituteInPlace Makefile \
+      --replace /usr/lib /lib \
+      --replace /usr/local/lib /lib \
+      --replace /usr/bin "" \
+      --replace /bin/ "" \
       --replace "CC = " "CC = cc #" \
-      --replace "SDK_DIR = " "SDK_DIR = . #"
-  '';
-
-  # Mac OS didn't support rpaths back before 10.5, and this package intentionally builds stubs targeting versions prior to that
-  NIX_DONT_SET_RPATH = "1";
-  NIX_NO_SELF_RPATH  = "1";
+      --replace "SDK_DIR = " "SDK_DIR = . #" \
 
-  installPhase = ''
-    export DSTROOT=$out
-    make install
+    # Mac OS didn't support rpaths back before 10.5, but we don't care about it.
+    substituteInPlace Makefile \
+      --replace -mmacosx-version-min=10.4 -mmacosx-version-min=10.6 \
+      --replace -mmacosx-version-min=10.5 -mmacosx-version-min=10.6
   '';
 
+  installFlags = [ "DSTROOT=$(out)" ];
+
   meta = with stdenv.lib; {
     description = "Apple's common startup stubs for darwin";
     maintainers = with maintainers; [ copumpkin ];