2016-06-03 09:10:13 +01:00
|
|
|
{ stdenv, fetchurl, unzip }:
|
2013-04-17 15:35:40 +01:00
|
|
|
|
2016-06-03 09:10:13 +01:00
|
|
|
let
|
|
|
|
version = "1.16.1";
|
|
|
|
in
|
2013-04-17 15:35:40 +01:00
|
|
|
stdenv.mkDerivation {
|
2016-06-03 09:10:13 +01:00
|
|
|
name = "dart-${version}";
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
unzip
|
|
|
|
];
|
2013-04-17 15:35:40 +01:00
|
|
|
|
|
|
|
src =
|
|
|
|
if stdenv.system == "x86_64-linux" then
|
2013-04-17 15:50:02 +01:00
|
|
|
fetchurl {
|
2016-06-03 09:10:13 +01:00
|
|
|
url = "https://storage.googleapis.com/dart-archive/channels/stable/release/${version}/sdk/dartsdk-linux-x64-release.zip";
|
|
|
|
sha256 = "01cbnc8hd2wwprmivppmzvld9ps644k16wpgqv31h1596l5p82n2";
|
2013-04-17 15:35:40 +01:00
|
|
|
}
|
|
|
|
else
|
2013-04-17 15:50:02 +01:00
|
|
|
fetchurl {
|
2016-06-03 09:10:13 +01:00
|
|
|
url = "https://storage.googleapis.com/dart-archive/channels/stable/release/${version}/sdk/dartsdk-linux-ia32-release.zip";
|
|
|
|
sha256 = "0jfwzc3jbk4n5j9ka59s9bkb25l5g85fl1nf676mvj36swcfykx3";
|
2013-04-17 15:35:40 +01:00
|
|
|
};
|
2016-06-03 09:10:13 +01:00
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out
|
|
|
|
cp -R * $out/
|
|
|
|
echo $libPath
|
|
|
|
patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
|
|
|
|
--set-rpath $libPath \
|
|
|
|
$out/bin/dart
|
|
|
|
'';
|
|
|
|
|
2015-01-15 04:25:26 +00:00
|
|
|
libPath = stdenv.lib.makeLibraryPath [ stdenv.cc.cc ];
|
2013-04-17 15:35:40 +01:00
|
|
|
|
|
|
|
dontStrip = true;
|
2016-06-03 09:10:13 +01:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
platforms = [ "i686-linux" "x86_64-linux" ];
|
|
|
|
homepage = "https://www.dartlang.org/";
|
|
|
|
description = "Scalable programming language, with robust libraries and runtimes, for building web, server, and mobile apps";
|
|
|
|
longDescription = ''
|
|
|
|
Dart is a class-based, single inheritance, object-oriented language
|
|
|
|
with C-style syntax. It offers compilation to JavaScript, interfaces,
|
|
|
|
mixins, abstract classes, reified generics, and optional typing.
|
|
|
|
'';
|
|
|
|
license = stdenv.lib.licenses.bsd3;
|
|
|
|
};
|
2015-01-15 04:25:26 +00:00
|
|
|
}
|