2021-02-05 17:12:51 +00:00
|
|
|
{lib, stdenv, darwin}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* This is needed to build GCC on Darwin.
|
|
|
|
*
|
|
|
|
* These are the collection of headers that would normally be available under
|
|
|
|
* /usr/include in macOS machines with command line tools installed. They need
|
|
|
|
* 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
|
|
|
|
'';
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta.platforms = lib.platforms.darwin;
|
2020-04-24 23:36:52 +00:00
|
|
|
}
|