flutter: Include patches in flutter_tools snapshot

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

View File

@ -2,6 +2,7 @@
, dart
, version
, flutterSrc
, patches ? [ ]
, pubspecLockFile
, vendorHash
, depsListFile
@ -14,6 +15,12 @@ buildDartApplication.override { inherit dart; } rec {
src = flutterSrc;
sourceRoot = "source/packages/flutter_tools";
postUnpack = ''chmod -R u+w "$NIX_BUILD_TOP/source"'';
inherit patches;
# The given patches are made for the entire SDK source tree.
prePatch = ''pushd "$NIX_BUILD_TOP/source"'';
postPatch = ''popd'';
dartEntryPoints."flutter_tools.snapshot" = "bin/flutter_tools.dart";

View File

@ -18,6 +18,7 @@ let
tools = callPackage ./flutter-tools.nix {
inherit dart version;
flutterSrc = src;
inherit patches;
inherit pubspecLockFile vendorHash depsListFile;
};