darwin.architecture: correctly install headers

I’m not going to fix all of them but this is the best way to do this
in Apple things. Just add ‘EXPORT_DSTDIR’ to the installFlags & set
‘DSTDIR’ to $(out). Please do this instead of the patching!
This commit is contained in:
Matthew Bauer 2018-05-12 10:02:30 -05:00
parent 108cf05ff0
commit d000198ab7

View File

@ -3,17 +3,9 @@
appleDerivation {
dontBuild = true;
postPatch = ''
substituteInPlace $sourceRoot/Makefile \
--replace "/usr/include" "/include" \
--replace "/usr/bin/" "" \
--replace "/bin/" ""
'';
installFlags = [ "EXPORT_DSTDIR=/include/architecture" ];
installPhase = ''
export DSTROOT=$out
make install
'';
DSTROOT = "$(out)";
meta = with stdenv.lib; {
maintainers = with maintainers; [ copumpkin ];