flutter: small refactorings in derivation

This commit is contained in:
Thiago Kenji Okada
2021-01-29 18:05:13 -03:00
parent f5294b802d
commit 910d06bb90
4 changed files with 26 additions and 25 deletions
+10 -5
View File
@@ -1,17 +1,22 @@
{ callPackage, dart }:
{ 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 = "1.22.4";
channel = "stable";
filename = "flutter_linux_${version}-${channel}.tar.xz";
in
{
mkFlutter = mkFlutter;
stable = mkFlutter rec {
inherit dart;
inherit dart version;
pname = "flutter";
version = "1.22.4";
sha256Hash = "0qalgav9drqddcj8lfvl9ddf3325n953pvkmgha47lslg9sa88zw";
patches = getPatches ./patches/stable;
src = fetchurl {
url = "https://storage.googleapis.com/flutter_infra/releases/${channel}/linux/${filename}";
sha256 = "0qalgav9drqddcj8lfvl9ddf3325n953pvkmgha47lslg9sa88zw";
};
patches = getPatches ./patches;
};
}