mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 23:13:19 +00:00
Merge pull request #111187 from thiagokokada/revert-flutter-bump
This commit is contained in:
commit
b2b193abc5
@ -1,11 +1,10 @@
|
||||
{ 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.5";
|
||||
version = "1.22.4";
|
||||
channel = "stable";
|
||||
filename = "flutter_linux_${version}-${channel}.tar.xz";
|
||||
in
|
||||
@ -14,11 +13,10 @@ in
|
||||
stable = mkFlutter rec {
|
||||
inherit dart version;
|
||||
pname = "flutter";
|
||||
patches = getPatches ./patches;
|
||||
src = fetchurl {
|
||||
url = "https://storage.googleapis.com/flutter_infra/releases/${channel}/linux/${filename}";
|
||||
sha256 = "1dv5kczcj9npf7xxlanmpc9ijnxa3ap46521cxn14c0i3y9295ja";
|
||||
sha256 = "0qalgav9drqddcj8lfvl9ddf3325n953pvkmgha47lslg9sa88zw";
|
||||
};
|
||||
depsSha256 = "0d7vhk6axgqajy2d9ia9lc6awcnz6cc3n04r7hnh7bx4hb0jv0l1";
|
||||
patches = getPatches ./patches;
|
||||
};
|
||||
}
|
||||
|
@ -3,7 +3,6 @@
|
||||
, patches
|
||||
, dart
|
||||
, src
|
||||
, depsSha256
|
||||
}:
|
||||
|
||||
{ bash
|
||||
@ -30,18 +29,13 @@
|
||||
, nspr
|
||||
, nss
|
||||
, systemd
|
||||
, callPackage
|
||||
}:
|
||||
let
|
||||
repository = callPackage ./repository.nix {
|
||||
inherit src pname version dart depsSha256;
|
||||
};
|
||||
drvName = "flutter-${version}";
|
||||
|
||||
flutter = stdenv.mkDerivation {
|
||||
name = "${drvName}-unwrapped";
|
||||
|
||||
buildInputs = [ git repository ];
|
||||
buildInputs = [ git ];
|
||||
|
||||
inherit src patches;
|
||||
|
||||
@ -55,12 +49,13 @@ let
|
||||
export FLUTTER_TOOLS_DIR="$FLUTTER_ROOT/packages/flutter_tools"
|
||||
export SCRIPT_PATH="$FLUTTER_TOOLS_DIR/bin/flutter_tools.dart"
|
||||
|
||||
mkdir -p "$out/bin/cache"
|
||||
export SNAPSHOT_PATH="$out/bin/cache/flutter_tools.snapshot"
|
||||
export STAMP_PATH="$out/bin/cache/flutter_tools.stamp"
|
||||
export SNAPSHOT_PATH="$FLUTTER_ROOT/bin/cache/flutter_tools.snapshot"
|
||||
export STAMP_PATH="$FLUTTER_ROOT/bin/cache/flutter_tools.stamp"
|
||||
|
||||
export DART_SDK_PATH="${dart}"
|
||||
export PUB_CACHE="${repository}"
|
||||
|
||||
HOME=../.. # required for pub upgrade --offline, ~/.pub-cache
|
||||
# path is relative otherwise it's replaced by /build/flutter
|
||||
|
||||
pushd "$FLUTTER_TOOLS_DIR"
|
||||
${dart}/bin/pub get --offline
|
||||
@ -70,6 +65,9 @@ let
|
||||
${dart}/bin/dart --snapshot="$SNAPSHOT_PATH" --packages="$FLUTTER_TOOLS_DIR/.packages" "$SCRIPT_PATH"
|
||||
echo "$revision" > "$STAMP_PATH"
|
||||
echo -n "${version}" > version
|
||||
|
||||
rm -r bin/cache/{artifacts,dart-sdk,downloads}
|
||||
rm bin/cache/*.stamp
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
|
@ -1,24 +0,0 @@
|
||||
{ lib, stdenv, dart, fetchurl, src, pname, version, depsSha256 }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
inherit src version;
|
||||
|
||||
pname = "${pname}-deps";
|
||||
buildInputs = [ dart ];
|
||||
|
||||
buildPhase = ''
|
||||
export PUB_CACHE="$out"
|
||||
export FLUTTER_ROOT="$(pwd)"
|
||||
export FLUTTER_TOOLS_DIR="$FLUTTER_ROOT/packages/flutter_tools"
|
||||
|
||||
pushd "$FLUTTER_TOOLS_DIR"
|
||||
${dart}/bin/pub get
|
||||
'';
|
||||
|
||||
dontInstall = true;
|
||||
dontFixup = true;
|
||||
|
||||
outputHashAlgo = "sha256";
|
||||
outputHashMode = "recursive";
|
||||
outputHash = depsSha256;
|
||||
}
|
Loading…
Reference in New Issue
Block a user