mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-17 06:06:13 +03:00
flutter.buildFlutterApplication: Allow overriding configuration attributes
This allows thing like `flutterBuildFlags` and `runtimeDependencies` to be overridden with `overrideAttrs`. Attributes that affect dependency retrieval cannot be overridden.
This commit is contained in:
parent
87f809e0c6
commit
329c494d0c
@ -30,8 +30,11 @@ let
|
||||
inherit pubGetScript vendorHash pubspecLockFile;
|
||||
buildDrvArgs = args;
|
||||
};
|
||||
self =
|
||||
(self: llvmPackages_13.stdenv.mkDerivation (args // {
|
||||
|
||||
in
|
||||
llvmPackages_13.stdenv.mkDerivation (finalAttrs: args // {
|
||||
inherit flutterBuildFlags runtimeDependencies;
|
||||
|
||||
outputs = [ "out" "debug" ];
|
||||
|
||||
nativeBuildInputs = [
|
||||
@ -54,7 +57,7 @@ let
|
||||
mkdir -p build/flutter_assets/fonts
|
||||
|
||||
flutter packages get --offline -v
|
||||
flutter build linux -v --release --split-debug-info="$debug" ${builtins.concatStringsSep " " (map (flag: "\"${flag}\"") flutterBuildFlags)}
|
||||
flutter build linux -v --release --split-debug-info="$debug" ${builtins.concatStringsSep " " (map (flag: "\"${flag}\"") finalAttrs.flutterBuildFlags)}
|
||||
|
||||
runHook postBuild
|
||||
'';
|
||||
@ -98,11 +101,9 @@ let
|
||||
# which is not what application authors expect.
|
||||
for f in "$out"/bin/*; do
|
||||
wrapProgram "$f" \
|
||||
--suffix LD_LIBRARY_PATH : '${lib.makeLibraryPath runtimeDependencies}'
|
||||
--suffix LD_LIBRARY_PATH : '${lib.makeLibraryPath finalAttrs.runtimeDependencies}'
|
||||
done
|
||||
|
||||
${postFixup}
|
||||
'';
|
||||
})) self;
|
||||
in
|
||||
self
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user