2021-01-29 18:03:58 +00:00
|
|
|
{ callPackage, fetchurl, dart }:
|
2019-12-24 17:01:45 +00:00
|
|
|
let
|
|
|
|
mkFlutter = opts: callPackage (import ./flutter.nix opts) { };
|
|
|
|
getPatches = dir:
|
|
|
|
let files = builtins.attrNames (builtins.readDir dir);
|
|
|
|
in map (f: dir + ("/" + f)) files;
|
2022-09-14 17:44:07 +00:00
|
|
|
version = "3.3.3";
|
2021-01-29 18:03:58 +00:00
|
|
|
channel = "stable";
|
|
|
|
filename = "flutter_linux_${version}-${channel}.tar.xz";
|
2021-09-25 02:09:00 +00:00
|
|
|
|
|
|
|
# Decouples flutter derivation from dart derivation,
|
|
|
|
# use specific dart version to not need to bump dart derivation when bumping flutter.
|
2022-09-14 17:44:07 +00:00
|
|
|
dartVersion = "2.18.2";
|
2021-09-25 02:09:00 +00:00
|
|
|
dartSourceBase = "https://storage.googleapis.com/dart-archive/channels";
|
|
|
|
dartForFlutter = dart.override {
|
|
|
|
version = dartVersion;
|
|
|
|
sources = {
|
|
|
|
"${dartVersion}-x86_64-linux" = fetchurl {
|
|
|
|
url = "${dartSourceBase}/stable/release/${dartVersion}/sdk/dartsdk-linux-x64-release.zip";
|
2022-09-14 17:44:07 +00:00
|
|
|
sha256 = "sha256-C3+YjecXLvSmJrLwi9H7TgD9Np0AArRWx3EdBrfQpTU";
|
2021-09-25 02:09:00 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
2022-05-15 17:36:01 +00:00
|
|
|
in
|
|
|
|
{
|
2022-05-13 11:37:44 +00:00
|
|
|
inherit mkFlutter;
|
2020-06-17 16:27:50 +00:00
|
|
|
stable = mkFlutter rec {
|
2021-09-25 02:09:00 +00:00
|
|
|
inherit version;
|
|
|
|
dart = dartForFlutter;
|
2019-12-24 17:01:45 +00:00
|
|
|
pname = "flutter";
|
2021-01-29 18:03:58 +00:00
|
|
|
src = fetchurl {
|
2021-09-25 02:09:00 +00:00
|
|
|
url = "https://storage.googleapis.com/flutter_infra_release/releases/${channel}/linux/${filename}";
|
2022-09-14 17:44:07 +00:00
|
|
|
sha256 = "sha256-MTZeWQUp4/TcPzYIT6eqIKSPUPvn2Mp/thOQzNgpTXg=";
|
2021-01-29 18:03:58 +00:00
|
|
|
};
|
|
|
|
patches = getPatches ./patches;
|
2019-12-24 17:01:45 +00:00
|
|
|
};
|
|
|
|
}
|