flutter: Remove hard dependency on Git

This commit is contained in:
hacker1024 2023-10-22 18:33:32 +11:00 committed by Maciej Krüger
parent 00a11274d4
commit 175112a996
No known key found for this signature in database
GPG Key ID: 0D948CE19CF49C5F
2 changed files with 6 additions and 6 deletions

View File

@ -45,10 +45,6 @@ let
owner = "flutter";
repo = "flutter";
rev = version;
# The Flutter SDK uses Git to obtain version information,
# and relies on many features that do not work with leaveDotGit alone.
# https://github.com/flutter/flutter/blob/master/packages/flutter_tools/lib/src/version.dart
deepClone = true;
hash = flutterHash;
};
};
@ -85,7 +81,7 @@ in
x86_64-darwin = "sha256-BchKowKd6BscVuk/dXibcQzdFkW9//GDfll77mHEI4M=";
aarch64-darwin = "sha256-9yrx09vYrOTmdqkfJI7mfh7DI1/rg67tPlf82m5+iKI=";
};
flutterHash = "sha256-s6JLDNHRBq3kZjA5vZHID9DQPNn/CZT2a3C3uvV/M6g=";
flutterHash = "sha256-00G030FvZZTsdf9ruFs9jdIHcC5h+xpp4NlmL64qVZA=";
patches = flutter3Patches;
pubspecLockFile = ./lockfiles/stable/pubspec.lock;
vendorHash = "sha256-lsFOvvmhszBcFb9XvabpqfL2Ek4wjhmB0OrcWUOURFQ=";

View File

@ -62,6 +62,10 @@ let
cp -r . $out
ln -sf ${dart} $out/bin/cache/dart-sdk
# The Flutter CLI launcher checks for the existance of a .git directory.
# https://github.com/flutter/flutter/blob/3.13.8/bin/internal/shared.sh#L224
mkdir -p "$out/.git"
runHook postInstall
'';
@ -74,7 +78,7 @@ let
export HOME="$(mktemp -d)"
$out/bin/flutter config --android-studio-dir $HOME
$out/bin/flutter config --android-sdk $HOME
$out/bin/flutter --version | fgrep -q '${version}'
$out/bin/flutter --version | fgrep -q '${builtins.substring 0 10 engineVersion}'
runHook postInstallCheck
'';