2021-01-15 20:22:01 +00:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
|
|
|
, fetchurl
|
|
|
|
, unzip
|
2021-01-24 11:19:42 +00:00
|
|
|
, version ? "2.10.5"
|
2021-01-15 20:22:01 +00:00
|
|
|
, sources ?
|
|
|
|
let
|
2018-02-18 12:10:51 +00:00
|
|
|
base = "https://storage.googleapis.com/dart-archive/channels";
|
2020-02-27 12:21:35 +00:00
|
|
|
x86_64 = "x64";
|
|
|
|
i686 = "ia32";
|
|
|
|
aarch64 = "arm64";
|
2021-01-15 20:22:01 +00:00
|
|
|
in
|
|
|
|
{
|
|
|
|
"${version}-x86_64-darwin" = fetchurl {
|
|
|
|
url = "${base}/stable/release/${version}/sdk/dartsdk-macos-${x86_64}-release.zip";
|
2021-01-24 11:19:42 +00:00
|
|
|
sha256 = "1vb2m25w6v901id9syan9q69fa60sxxd7qpyzq21fn5dpah0g99i";
|
2020-11-26 07:49:08 +00:00
|
|
|
};
|
2021-01-15 20:22:01 +00:00
|
|
|
"${version}-x86_64-linux" = fetchurl {
|
|
|
|
url = "${base}/stable/release/${version}/sdk/dartsdk-linux-${x86_64}-release.zip";
|
2021-01-24 11:19:42 +00:00
|
|
|
sha256 = "1mb6m3vxjya1dz47mdna23c2015n3bz8dvz8fwggq6k3zp0a4dsh";
|
2021-01-15 20:32:57 +00:00
|
|
|
};
|
|
|
|
"${version}-i686-linux" = fetchurl {
|
|
|
|
url = "${base}/stable/release/${version}/sdk/dartsdk-linux-${i686}-release.zip";
|
2021-01-24 11:19:42 +00:00
|
|
|
sha256 = "10g4qrwvmabrdg4i8y0wq9g7whqcpkdfp05yilflg70ybplrscf7";
|
2021-01-15 20:32:57 +00:00
|
|
|
};
|
|
|
|
"${version}-aarch64-linux" = fetchurl {
|
|
|
|
url = "${base}/stable/release/${version}/sdk/dartsdk-linux-${aarch64}-release.zip";
|
2021-01-24 11:19:42 +00:00
|
|
|
sha256 = "0js83wy496swcwia144fhxk872irb5nr6i8558hxabkdrpv1bky5";
|
2020-10-07 03:54:12 +01:00
|
|
|
};
|
2021-01-15 20:22:01 +00:00
|
|
|
}
|
|
|
|
}:
|
2020-02-27 12:21:35 +00:00
|
|
|
|
2013-04-17 15:35:40 +01:00
|
|
|
stdenv.mkDerivation {
|
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
|
2020-09-17 19:33:17 +01:00
|
|
|
find $out/bin -executable -type f -exec patchelf --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) {} \;
|
2016-06-03 09:10:13 +01:00
|
|
|
'';
|
|
|
|
|
2021-01-15 20:22:01 +00:00
|
|
|
libPath = lib.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
|
|
|
|
2021-01-15 20:22:01 +00:00
|
|
|
meta = with lib; {
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://www.dartlang.org/";
|
2021-01-24 13:08:17 +00:00
|
|
|
maintainers = with maintainers; [ grburst thiagokokada ];
|
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-11-26 07:49:08 +00:00
|
|
|
platforms = [ "x86_64-linux" "i686-linux" "aarch64-linux" "x86_64-darwin" ];
|
2020-02-27 12:21:35 +00:00
|
|
|
license = licenses.bsd3;
|
2016-06-03 09:10:13 +01:00
|
|
|
};
|
2015-01-15 04:25:26 +00:00
|
|
|
}
|