2020-04-28 13:56:30 +01:00
|
|
|
{ stdenv, fetchurl, unzip, version ? "2.7.2" }:
|
2013-04-17 15:35:40 +01:00
|
|
|
|
2016-06-03 09:10:13 +01:00
|
|
|
let
|
2018-02-18 12:10:51 +00:00
|
|
|
|
|
|
|
sources = let
|
|
|
|
|
|
|
|
base = "https://storage.googleapis.com/dart-archive/channels";
|
2020-02-27 12:21:35 +00:00
|
|
|
stable_version = "stable";
|
|
|
|
dev_version = "dev";
|
|
|
|
x86_64 = "x64";
|
|
|
|
i686 = "ia32";
|
|
|
|
aarch64 = "arm64";
|
2018-02-18 12:10:51 +00:00
|
|
|
|
|
|
|
in {
|
|
|
|
"1.24.3-x86_64-linux" = fetchurl {
|
2020-02-27 12:21:35 +00:00
|
|
|
url = "${base}/${stable_version}/release/${version}/sdk/dartsdk-linux-${x86_64}-release.zip";
|
|
|
|
sha256 = "16sm02wbkj328ni0z1z4n4msi12lb8ijxzmbbfamvg766mycj8z3";
|
2018-02-18 12:10:51 +00:00
|
|
|
};
|
|
|
|
"1.24.3-i686-linux" = fetchurl {
|
2020-02-27 12:21:35 +00:00
|
|
|
url = "${base}/${stable_version}/release/${version}/sdk/dartsdk-linux-${i686}-release.zip";
|
|
|
|
sha256 = "0a559mfpb0zfd49zdcpld95h2g1lmcjwwsqf69hd9rw6j67qyyyn";
|
|
|
|
};
|
|
|
|
"1.24.3-aarch64-linux" = fetchurl {
|
|
|
|
url = "${base}/${stable_version}/release/${version}/sdk/dartsdk-linux-${aarch64}-release.zip";
|
|
|
|
sha256 = "1p5bn04gr91chcszgmw5ng8mlzgwsrdr2v7k7ppwr1slkx97fsrh";
|
2018-02-18 12:10:51 +00:00
|
|
|
};
|
2020-04-28 13:56:30 +01:00
|
|
|
"2.7.2-x86_64-linux" = fetchurl {
|
2020-02-27 12:21:35 +00:00
|
|
|
url = "${base}/${stable_version}/release/${version}/sdk/dartsdk-linux-${x86_64}-release.zip";
|
2020-04-28 13:56:30 +01:00
|
|
|
sha256 = "0vvsgda1smqdjn35yiq9pxx8f5haxb4hqnspcsfs6sn5c36k854v";
|
2018-09-30 22:44:06 +01:00
|
|
|
};
|
2020-04-28 13:56:30 +01:00
|
|
|
"2.7.2-i686-linux" = fetchurl {
|
2020-02-27 12:21:35 +00:00
|
|
|
url = "${base}/${stable_version}/release/${version}/sdk/dartsdk-linux-${i686}-release.zip";
|
2020-04-28 13:56:30 +01:00
|
|
|
sha256 = "0dj01d2wwrp3cc5x73vs6fzhs6db60gkbjlrw3w9j04wcx69i38m";
|
2018-09-30 22:44:06 +01:00
|
|
|
};
|
2020-04-28 13:56:30 +01:00
|
|
|
"2.7.2-aarch64-linux" = fetchurl {
|
2020-02-27 12:21:35 +00:00
|
|
|
url = "${base}/${stable_version}/release/${version}/sdk/dartsdk-linux-${aarch64}-release.zip";
|
2020-04-28 13:56:30 +01:00
|
|
|
sha256 = "1p66fkdh1kv0ypmadmg67c3y3li3aaf1lahqh2g6r6qrzbh5da2p";
|
2018-02-18 12:10:51 +00:00
|
|
|
};
|
2020-10-07 03:54:12 +01:00
|
|
|
"2.10.0-x86_64-linux" = fetchurl {
|
|
|
|
url = "${base}/${stable_version}/release/${version}/sdk/dartsdk-linux-${x86_64}-release.zip";
|
|
|
|
sha256 = "0dncmsfbwcn3ygflhp83i6z4bvc02fbpaq1vzdzw8xdk3sbynchb";
|
|
|
|
};
|
2020-04-28 13:56:30 +01:00
|
|
|
"2.9.0-4.0.dev-x86_64-linux" = fetchurl {
|
2020-02-27 12:21:35 +00:00
|
|
|
url = "${base}/${dev_version}/release/${version}/sdk/dartsdk-linux-${x86_64}-release.zip";
|
2020-04-28 13:56:30 +01:00
|
|
|
sha256 = "16d9842fb3qbc0hy0zmimav9zndfkq96glgykj20xssc88qpjk2r";
|
2020-02-27 12:21:35 +00:00
|
|
|
};
|
2020-04-28 13:56:30 +01:00
|
|
|
"2.9.0-4.0.dev-i686-linux" = fetchurl {
|
2020-02-27 12:21:35 +00:00
|
|
|
url = "${base}/${dev_version}/release/${version}/sdk/dartsdk-linux-${i686}-release.zip";
|
2020-04-28 13:56:30 +01:00
|
|
|
sha256 = "105wgyxmi491c7qw0z3zhn4lv52h80ngyz4ch9dyj0sq8nndz2rc";
|
2020-02-27 12:21:35 +00:00
|
|
|
};
|
2020-04-28 13:56:30 +01:00
|
|
|
"2.9.0-4.0.dev-aarch64-linux" = fetchurl {
|
2020-02-27 12:21:35 +00:00
|
|
|
url = "${base}/${dev_version}/release/${version}/sdk/dartsdk-linux-${aarch64}-release.zip";
|
2020-04-28 13:56:30 +01:00
|
|
|
sha256 = "1x6mlmc4hccmx42k7srhma18faxpxvghjwqahna80508rdpljwgc";
|
2018-02-18 12:10:51 +00:00
|
|
|
};
|
2020-10-07 03:54:12 +01:00
|
|
|
"2.11.0-161.0.dev-x86_64-linux" = fetchurl {
|
|
|
|
url = "${base}/${dev_version}/release/${version}/sdk/dartsdk-linux-${x86_64}-release.zip";
|
|
|
|
sha256 = "05difz4w2fyh2yq5p5pkrqk59jqljlxhc1i6lmy5kihh6z69r12i";
|
|
|
|
};
|
2018-02-18 12:10:51 +00:00
|
|
|
};
|
|
|
|
|
2016-06-03 09:10:13 +01:00
|
|
|
in
|
2018-02-18 12:10:51 +00:00
|
|
|
|
2020-02-27 12:21:35 +00:00
|
|
|
with stdenv.lib;
|
|
|
|
|
2013-04-17 15:35:40 +01:00
|
|
|
stdenv.mkDerivation {
|
2018-02-18 12:10:51 +00:00
|
|
|
|
2019-08-13 22:52:01 +01:00
|
|
|
pname = "dart";
|
|
|
|
inherit version;
|
2016-06-03 09:10:13 +01:00
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
unzip
|
|
|
|
];
|
2018-02-18 12:10:51 +00:00
|
|
|
|
2018-08-20 20:11:29 +01:00
|
|
|
src = sources."${version}-${stdenv.hostPlatform.system}" or (throw "unsupported version/system: ${version}/${stdenv.hostPlatform.system}");
|
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
|
|
|
|
'';
|
|
|
|
|
2020-02-27 12:21:35 +00:00
|
|
|
libPath = makeLibraryPath [ stdenv.cc.cc ];
|
2018-05-01 19:51:03 +01:00
|
|
|
|
2013-04-17 15:35:40 +01:00
|
|
|
dontStrip = true;
|
2018-05-01 19:51:03 +01:00
|
|
|
|
2016-06-03 09:10:13 +01:00
|
|
|
meta = {
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://www.dartlang.org/";
|
2020-02-27 12:21:35 +00:00
|
|
|
maintainers = with maintainers; [ grburst ];
|
2016-06-03 09:10:13 +01:00
|
|
|
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.
|
|
|
|
'';
|
2020-02-27 12:21:35 +00:00
|
|
|
platforms = [ "x86_64-linux" "i686-linux" "aarch64-linux" ];
|
|
|
|
license = licenses.bsd3;
|
2016-06-03 09:10:13 +01:00
|
|
|
};
|
2015-01-15 04:25:26 +00:00
|
|
|
}
|