mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-30 17:43:42 +00:00
37 lines
1.2 KiB
Nix
37 lines
1.2 KiB
Nix
{ callPackage, fetchurl, dart }:
|
|
let
|
|
mkFlutter = opts: callPackage (import ./flutter.nix opts) { };
|
|
getPatches = dir:
|
|
let files = builtins.attrNames (builtins.readDir dir);
|
|
in map (f: dir + ("/" + f)) files;
|
|
version = "2.10.0";
|
|
channel = "stable";
|
|
filename = "flutter_linux_${version}-${channel}.tar.xz";
|
|
|
|
# Decouples flutter derivation from dart derivation,
|
|
# use specific dart version to not need to bump dart derivation when bumping flutter.
|
|
dartVersion = "2.16.0";
|
|
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";
|
|
sha256 = "sha256-n+hr3iMt5S0iEeR/X9zBQ86TbjCajaG0RyE+Ij1/aNM=";
|
|
};
|
|
};
|
|
};
|
|
in {
|
|
mkFlutter = mkFlutter;
|
|
stable = mkFlutter rec {
|
|
inherit version;
|
|
dart = dartForFlutter;
|
|
pname = "flutter";
|
|
src = fetchurl {
|
|
url = "https://storage.googleapis.com/flutter_infra_release/releases/${channel}/linux/${filename}";
|
|
sha256 = "sha256-4ZEpZPGVnisnK9QT1o4G2G6CiflYElh+e3+X8odnx1U=";
|
|
};
|
|
patches = getPatches ./patches;
|
|
};
|
|
}
|