2016-06-26 06:45:55 +02:00
|
|
|
{ stdenv, sdk, writeText, platformName, xcbuild }:
|
|
|
|
|
|
|
|
let
|
|
|
|
|
|
|
|
Info = {
|
|
|
|
CFBundleIdentifier = platformName;
|
|
|
|
Type = "Platform";
|
|
|
|
};
|
|
|
|
|
|
|
|
Version = {
|
|
|
|
ProjectName = "OSXPlatformSupport";
|
|
|
|
};
|
|
|
|
|
|
|
|
in
|
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
name = "nixpkgs.platform";
|
|
|
|
buildInputs = [ xcbuild ];
|
|
|
|
buildCommand = ''
|
|
|
|
mkdir -p $out/
|
|
|
|
cd $out/
|
|
|
|
|
2016-11-06 01:51:15 +01:00
|
|
|
plutil -convert xml1 -o Info.plist ${writeText "Info.plist" (builtins.toJSON Info)}
|
|
|
|
plutil -convert xml1 -o version.plist ${writeText "version.plist" (builtins.toJSON Version)}
|
2016-06-26 06:45:55 +02:00
|
|
|
|
|
|
|
mkdir -p $out/Developer/SDKs/
|
|
|
|
cd $out/Developer/SDKs/
|
|
|
|
ln -s ${sdk}
|
|
|
|
'';
|
|
|
|
}
|