2015-02-03 22:06:13 +00:00
|
|
|
{ stdenv, fetchurl, xar, gzip, cpio }:
|
2014-10-02 02:57:27 +01:00
|
|
|
|
|
|
|
let
|
2015-02-03 22:06:13 +00:00
|
|
|
pkg = { name, sha256 }: stdenv.mkDerivation {
|
|
|
|
inherit name;
|
2014-10-04 19:52:39 +01:00
|
|
|
|
2015-02-03 22:06:13 +00:00
|
|
|
src = fetchurl {
|
2015-04-09 13:50:53 +01:00
|
|
|
# Magic url found in:
|
|
|
|
# https://swscan.apple.com/content/catalogs/others/index-10.9-1.sucatalog
|
2015-05-18 20:09:24 +01:00
|
|
|
url = "http://swcdn.apple.com/content/downloads/27/02/031-06182/xxog8vxu8i6af781ivf4uhy6yt1lslex34/${name}.pkg";
|
2015-02-03 22:06:13 +00:00
|
|
|
inherit sha256;
|
2014-10-02 02:57:27 +01:00
|
|
|
};
|
2014-10-04 19:52:39 +01:00
|
|
|
|
2015-02-03 22:06:13 +00:00
|
|
|
buildInputs = [ xar gzip cpio ];
|
2014-10-02 02:57:27 +01:00
|
|
|
|
|
|
|
phases = [ "unpackPhase" "installPhase" ];
|
|
|
|
|
|
|
|
unpackPhase = ''
|
2015-02-03 22:06:13 +00:00
|
|
|
xar -x -f $src
|
2014-10-02 02:57:27 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
2014-10-04 19:52:39 +01:00
|
|
|
start="$(pwd)"
|
2015-02-03 22:06:13 +00:00
|
|
|
mkdir -p $out
|
|
|
|
cd $out
|
|
|
|
cat $start/Payload | gzip -d | cpio -idm
|
2014-10-02 02:57:27 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
2015-02-03 22:06:13 +00:00
|
|
|
description = "Apple developer tools ${name}";
|
2014-10-02 02:57:27 +01:00
|
|
|
maintainers = with maintainers; [ copumpkin ];
|
|
|
|
platforms = platforms.darwin;
|
|
|
|
};
|
|
|
|
};
|
2014-10-04 19:52:39 +01:00
|
|
|
in rec {
|
2015-02-03 22:06:13 +00:00
|
|
|
tools = pkg {
|
2015-04-09 13:50:53 +01:00
|
|
|
name = "CLTools_Executables_OSX109";
|
|
|
|
sha256 = "1cjdnnjny6h0dc1cc994pgrkmsa5cvk7pi5dpkxyslyicwf260fx";
|
2014-10-04 19:52:39 +01:00
|
|
|
};
|
|
|
|
|
2015-02-03 22:06:13 +00:00
|
|
|
sdk = pkg {
|
|
|
|
name = "DevSDK_OSX109";
|
2015-04-09 13:50:53 +01:00
|
|
|
sha256 = "16b7aplha5573yl1d44nl2yxzp0w2hafihbyh7930wrcvba69iy4";
|
2015-02-03 22:06:13 +00:00
|
|
|
};
|
2014-10-02 02:57:27 +01:00
|
|
|
}
|