2015-02-03 23:06:13 +01:00
|
|
|
{ stdenv, fetchurl, xar, gzip, cpio }:
|
2014-10-02 03:57:27 +02:00
|
|
|
|
|
|
|
let
|
2015-02-03 23:06:13 +01:00
|
|
|
pkg = { name, sha256 }: stdenv.mkDerivation {
|
|
|
|
inherit name;
|
2014-10-04 20:52:39 +02:00
|
|
|
|
2015-02-03 23:06:13 +01:00
|
|
|
src = fetchurl {
|
|
|
|
url = "http://swcdn.apple.com/content/downloads/00/14/031-07556/i7hoqm3awowxdy48l34uel4qvwhdq8lgam/${name}.pkg";
|
|
|
|
inherit sha256;
|
2014-10-02 03:57:27 +02:00
|
|
|
};
|
2014-10-04 20:52:39 +02:00
|
|
|
|
2015-02-03 23:06:13 +01:00
|
|
|
buildInputs = [ xar gzip cpio ];
|
2014-10-02 03:57:27 +02:00
|
|
|
|
|
|
|
phases = [ "unpackPhase" "installPhase" ];
|
|
|
|
|
|
|
|
unpackPhase = ''
|
2015-02-03 23:06:13 +01:00
|
|
|
xar -x -f $src
|
2014-10-02 03:57:27 +02:00
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
2014-10-04 20:52:39 +02:00
|
|
|
start="$(pwd)"
|
2015-02-03 23:06:13 +01:00
|
|
|
mkdir -p $out
|
|
|
|
cd $out
|
|
|
|
cat $start/Payload | gzip -d | cpio -idm
|
2014-10-02 03:57:27 +02:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
2015-02-03 23:06:13 +01:00
|
|
|
description = "Apple developer tools ${name}";
|
2014-10-02 03:57:27 +02:00
|
|
|
maintainers = with maintainers; [ copumpkin ];
|
|
|
|
platforms = platforms.darwin;
|
|
|
|
};
|
|
|
|
};
|
2014-10-04 20:52:39 +02:00
|
|
|
in rec {
|
2015-02-03 23:06:13 +01:00
|
|
|
tools = pkg {
|
|
|
|
name = "CLTools_Executables";
|
|
|
|
sha256 = "1rqrgip9pwr9d6p1hkd027lzxpymr1qm54jjnkldjjb8m4nps7bp";
|
2014-10-04 20:52:39 +02:00
|
|
|
};
|
|
|
|
|
2015-02-03 23:06:13 +01:00
|
|
|
sdk = pkg {
|
|
|
|
name = "DevSDK_OSX109";
|
|
|
|
sha256 = "0x6r61h78r5cxk9dbw6fnjpn6ydi4kcajvllpczx3mi52crlkm4x";
|
|
|
|
};
|
2014-10-02 03:57:27 +02:00
|
|
|
}
|