From a0948ffdb04ebf6376caca9a007e381065895a0f Mon Sep 17 00:00:00 2001 From: Daiderd Jordan Date: Tue, 21 Nov 2017 19:43:44 +0100 Subject: [PATCH] Csu: fix build with CoreFoundation --- .../apple-source-releases/Csu/default.nix | 28 +++++++++---------- 1 file 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 8dcf28a59094..7fd32a64fe57 100644 --- a/pkgs/os-specific/darwin/apple-source-releases/Csu/default.nix +++ b/pkgs/os-specific/darwin/apple-source-releases/Csu/default.nix @@ -1,24 +1,22 @@ { 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 = . #" + --replace "SDK_DIR = " "SDK_DIR = . #" \ + + # 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 ''; - # 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"; - - installPhase = '' - export DSTROOT=$out - make install - ''; + installFlags = [ "DSTROOT=$(out)" ]; meta = with stdenv.lib; { description = "Apple's common startup stubs for darwin";