2013-04-17 16:35:40 +02:00
|
|
|
{ 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
|
2014-12-17 19:11:30 +01:00
|
|
|
patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
|
2013-04-17 16:35:40 +02:00
|
|
|
--set-rpath $libPath \
|
|
|
|
$out/bin/dart
|
2013-04-17 16:50:02 +02:00
|
|
|
|
|
|
|
# Hack around weird dart2js resolving bug
|
2013-04-17 16:35:40 +02:00
|
|
|
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
|
2013-04-17 16:50:02 +02:00
|
|
|
fetchurl {
|
|
|
|
url = http://download.zef.s3.amazonaws.com/dartsdk-m4-linux-64.tar.gz;
|
|
|
|
sha256 = "1riwxxczskfsaax7n03m7isnbxf3walky0cac1w8j5apr1xvg5ma";
|
2013-04-17 16:35:40 +02:00
|
|
|
}
|
|
|
|
else
|
2013-04-17 16:50:02 +02:00
|
|
|
fetchurl {
|
|
|
|
url = http://download.zef.s3.amazonaws.com/dartsdk-m4-linux-32.tar.gz;
|
|
|
|
sha256 = "00935c4vxfj2h3x354g75qdazswwissbwc7kj5k05l1m3lizikf6";
|
2013-04-17 16:35:40 +02:00
|
|
|
};
|
|
|
|
|
2014-12-17 19:11:30 +01:00
|
|
|
libPath = stdenv.lib.makeLibraryPath [ stdenv.cc.gcc ];
|
2013-04-17 16:35:40 +02:00
|
|
|
|
|
|
|
dontStrip = true;
|
|
|
|
}
|