2016-09-15 05:19:28 +02:00
|
|
|
{stdenv, darwin}:
|
|
|
|
|
|
|
|
/*
|
|
|
|
* This is needed to build GCC on Darwin.
|
|
|
|
*
|
|
|
|
* These are the collection of headers that would normally be available under
|
2017-08-07 00:05:18 +02:00
|
|
|
* /usr/include in macOS machines with command line tools installed. They need
|
2016-09-15 05:19:28 +02:00
|
|
|
* to be in one folder for gcc to use them correctly.
|
|
|
|
*/
|
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
name = "darwin-usr-include";
|
|
|
|
buildInputs = [ darwin.CF stdenv.libc ];
|
|
|
|
buildCommand = ''
|
|
|
|
mkdir -p $out
|
|
|
|
cd $out
|
|
|
|
ln -sf ${stdenv.libc}/include/* .
|
|
|
|
mkdir CoreFoundation
|
|
|
|
ln -sf ${darwin.CF}/Library/Frameworks/CoreFoundation.framework/Headers/* CoreFoundation
|
|
|
|
'';
|
2017-08-27 17:01:43 +02:00
|
|
|
|
|
|
|
meta.platforms = stdenv.lib.platforms.darwin;
|
2016-09-15 05:19:28 +02:00
|
|
|
}
|