@@ -1,25 +1,23 @@
11{ stdenv, appleDerivation }:
22
33appleDerivation {
4− postUnpack = ''
5− substituteInPlace $sourceRoot/Makefile \
6− --replace "/usr/lib" "/lib" \
7− --replace "/usr/local/lib" "/lib" \
8− --replace "/usr/bin" "" \
9− --replace "/bin/" "" \
4+ prePatch = ''
5+ substituteInPlace Makefile \
6+ --replace /usr/lib /lib \
7+ --replace /usr/local/lib /lib \
8+ --replace /usr/bin "" \
9+ --replace /bin/ "" \
1010 --replace "CC = " "CC = cc #" \
11− --replace "SDK_DIR = " "SDK_DIR = . #"
12− '';
13−
14− # Mac OS didn't support rpaths back before 10.5, and this package intentionally builds stubs targeting versions prior to that
15− NIX_DONT_SET_RPATH = "1";
16− NIX_NO_SELF_RPATH = "1";
11+ --replace "SDK_DIR = " "SDK_DIR = . #" \
1712
18− installPhase = ''
19− export DSTROOT=$out
20− make install
13+ # Mac OS didn't support rpaths back before 10.5, but we don't care about it.
14+ substituteInPlace Makefile \
15+ --replace -mmacosx-version-min=10.4 -mmacosx-version-min=10.6 \
16+ --replace -mmacosx-version-min=10.5 -mmacosx-version-min=10.6
2117 '';
2218
19+ installFlags = [ "DSTROOT=$(out)" ];
20+
2321 meta = with stdenv.lib; {
2422 description = "Apple's common startup stubs for darwin";
2523 maintainers = with maintainers; [ copumpkin ];