2021-02-05 17:12:51 +00:00
|
|
|
{ callPackage, fetchurl, dart }:
|
2020-04-24 23:36:52 +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;
|
2021-12-19 01:06:50 +00:00
|
|
|
version = "2.8.0";
|
2021-02-05 17:12:51 +00:00
|
|
|
channel = "stable";
|
|
|
|
filename = "flutter_linux_${version}-${channel}.tar.xz";
|
2021-09-28 08:13:01 +00:00
|
|
|
|
|
|
|
# Decouples flutter derivation from dart derivation,
|
|
|
|
# use specific dart version to not need to bump dart derivation when bumping flutter.
|
2021-12-19 01:06:50 +00:00
|
|
|
dartVersion = "2.15.0";
|
2021-09-28 08:13:01 +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";
|
2021-12-19 01:06:50 +00:00
|
|
|
sha256 = "sha256-U1V1OPmFeNZCdBxFy7yqAbAE0cxh9f2UqKQmreJu9YA=";
|
2021-09-28 08:13:01 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
in {
|
2020-09-25 04:45:31 +00:00
|
|
|
mkFlutter = mkFlutter;
|
2020-08-20 17:08:02 +00:00
|
|
|
stable = mkFlutter rec {
|
2021-09-28 08:13:01 +00:00
|
|
|
inherit version;
|
|
|
|
dart = dartForFlutter;
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "flutter";
|
2021-02-05 17:12:51 +00:00
|
|
|
src = fetchurl {
|
2021-09-28 08:13:01 +00:00
|
|
|
url = "https://storage.googleapis.com/flutter_infra_release/releases/${channel}/linux/${filename}";
|
2021-12-19 01:06:50 +00:00
|
|
|
sha256 = "sha256-sSz/owGdCMB5b9+cAWvLkrfFcIIq5665Xopd4JKv1G4=";
|
2021-02-05 17:12:51 +00:00
|
|
|
};
|
|
|
|
patches = getPatches ./patches;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|