nixpkgs/pkgs/os-specific/darwin/command-line-tools/default.nix

44 lines
993 B
Nix
Raw Normal View History

2015-02-03 23:06:13 +01:00
{ stdenv, fetchurl, xar, gzip, cpio }:
let
2015-02-03 23:06:13 +01:00
pkg = { name, sha256 }: stdenv.mkDerivation {
inherit name;
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;
};
2015-02-03 23:06:13 +01:00
buildInputs = [ xar gzip cpio ];
phases = [ "unpackPhase" "installPhase" ];
unpackPhase = ''
2015-02-03 23:06:13 +01:00
xar -x -f $src
'';
installPhase = ''
start="$(pwd)"
2015-02-03 23:06:13 +01:00
mkdir -p $out
cd $out
cat $start/Payload | gzip -d | cpio -idm
'';
meta = with stdenv.lib; {
2015-02-03 23:06:13 +01:00
description = "Apple developer tools ${name}";
maintainers = with maintainers; [ copumpkin ];
platforms = platforms.darwin;
};
};
in rec {
2015-02-03 23:06:13 +01:00
tools = pkg {
name = "CLTools_Executables";
sha256 = "1rqrgip9pwr9d6p1hkd027lzxpymr1qm54jjnkldjjb8m4nps7bp";
};
2015-02-03 23:06:13 +01:00
sdk = pkg {
name = "DevSDK_OSX109";
sha256 = "0x6r61h78r5cxk9dbw6fnjpn6ydi4kcajvllpczx3mi52crlkm4x";
};
}