1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-22 13:41:26 +00:00
nixpkgs/pkgs/development/interpreters/dart/default.nix
John Wiegley 28b6fb61e6 Change occurrences of gcc to the more general cc
This is done for the sake of Yosemite, which does not have gcc, and yet
this change is also compatible with Linux.
2014-12-26 11:06:21 -06:00

39 lines
1.1 KiB
Nix

{ stdenv, fetchurl }:
assert stdenv.system == "x86_64-linux" || stdenv.system == "i686-linux";
stdenv.mkDerivation {
name = "dart-0.4";
installPhase = ''
mkdir -p $out
cp -R * $out/
echo $libPath
patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
--set-rpath $libPath \
$out/bin/dart
# Hack around weird dart2js resolving bug
mv $out/bin/dart2js $out/bin/.dart2js
echo "#!/bin/sh" > $out/bin/dart2js
echo "$out/bin/.dart2js \$*" >> $out/bin/dart2js
chmod +x $out/bin/dart2js
'';
src =
if stdenv.system == "x86_64-linux" then
fetchurl {
url = http://download.zef.s3.amazonaws.com/dartsdk-m4-linux-64.tar.gz;
sha256 = "1riwxxczskfsaax7n03m7isnbxf3walky0cac1w8j5apr1xvg5ma";
}
else
fetchurl {
url = http://download.zef.s3.amazonaws.com/dartsdk-m4-linux-32.tar.gz;
sha256 = "00935c4vxfj2h3x354g75qdazswwissbwc7kj5k05l1m3lizikf6";
};
libPath = stdenv.lib.makeLibraryPath [ stdenv.cc.gcc ];
dontStrip = true;
}