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;
|
2022-10-21 18:38:19 +00:00
|
|
|
flutterDrv = { version, pname, dartVersion, hash, dartHash, patches }: mkFlutter {
|
|
|
|
inherit version pname patches;
|
|
|
|
dart = dart.override {
|
|
|
|
version = dartVersion;
|
|
|
|
sources = {
|
|
|
|
"${dartVersion}-x86_64-linux" = fetchurl {
|
|
|
|
url = "https://storage.googleapis.com/dart-archive/channels/stable/release/${dartVersion}/sdk/dartsdk-linux-x64-release.zip";
|
|
|
|
sha256 = dartHash.x86_64-linux;
|
|
|
|
};
|
|
|
|
"${dartVersion}-aarch64-linux" = fetchurl {
|
|
|
|
url = "https://storage.googleapis.com/dart-archive/channels/stable/release/${dartVersion}/sdk/dartsdk-linux-arm64-release.zip";
|
|
|
|
sha256 = dartHash.aarch64-linux;
|
|
|
|
};
|
2021-09-28 08:13:01 +00:00
|
|
|
};
|
|
|
|
};
|
2022-10-21 18:38:19 +00:00
|
|
|
src = fetchurl {
|
|
|
|
url = "https://storage.googleapis.com/flutter_infra_release/releases/stable/linux/flutter_linux_${version}-stable.tar.xz";
|
|
|
|
sha256 = hash;
|
|
|
|
};
|
2021-09-28 08:13:01 +00:00
|
|
|
};
|
2022-08-21 13:32:41 +00:00
|
|
|
in
|
|
|
|
{
|
2022-06-16 17:23:12 +00:00
|
|
|
inherit mkFlutter;
|
2022-10-21 18:38:19 +00:00
|
|
|
stable = flutterDrv {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "flutter";
|
2022-11-21 17:40:18 +00:00
|
|
|
version = "3.3.8";
|
|
|
|
dartVersion = "2.18.4";
|
|
|
|
hash = "sha256-QH+10F6a0XYEvBetiAi45Sfy7WTdVZ1i8VOO4JuSI24=";
|
2022-10-21 18:38:19 +00:00
|
|
|
dartHash = {
|
2022-11-21 17:40:18 +00:00
|
|
|
x86_64-linux = "sha256-lFw+KaxzhuAMnu6ypczINqywzpiD+8Kd+C/UHJDrO9Y=";
|
|
|
|
aarch64-linux = "sha256-snlFTY4oJ4ALGLc210USbI2Z///cx1IVYUWm7Vo5z2I=";
|
2022-10-21 18:38:19 +00:00
|
|
|
};
|
|
|
|
patches = getPatches ./patches/flutter3;
|
|
|
|
};
|
|
|
|
|
|
|
|
v2 = flutterDrv {
|
|
|
|
pname = "flutter";
|
|
|
|
version = "2.10.5";
|
|
|
|
dartVersion = "2.16.2";
|
|
|
|
hash = "sha256-DTZwxlMUYk8NS1SaWUJolXjD+JnRW73Ps5CdRHDGnt0=";
|
|
|
|
dartHash = {
|
|
|
|
x86_64-linux = "sha256-egrYd7B4XhkBiHPIFE2zopxKtQ58GqlogAKA/UeiXnI=";
|
|
|
|
aarch64-linux = "sha256-vmerjXkUAUnI8FjK+62qLqgETmA+BLPEZXFxwYpI+KY=";
|
2021-02-05 17:12:51 +00:00
|
|
|
};
|
2022-10-21 18:38:19 +00:00
|
|
|
patches = getPatches ./patches/flutter2;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|