summary refs log tree commit diff
path: root/pkgs/build-support/flutter
AgeCommit message (Collapse)AuthorFilesLines
2023-05-14flutter: build-support: allow customizing wrapProgram argsgilice1-1/+3
2023-05-12dart: Spoof Git dependency version checkshacker10241-1/+1
2023-05-11Merge pull request #229770 from Misterio77/init-buildDartPackageKira Bruneau1-1/+1
buildDartApplication: init
2023-05-06treewide: switch builtins.fromJSON(builtins.readFile ./file.json) to ↵Sandro Jäckel1-2/+2
lib.importJSON ./file.json #2
2023-05-05buildFlutterApplication: default vendorHash to ""Gabriel Fontes1-1/+1
This makes it more ergonomical to use, and is consistent with buildDartApplication.
2023-04-23flutter.buildFlutterApplication: Add an option to generate the dependency ↵hacker10241-6/+18
list with IFD This is useful for projects outside of Nixpkgs.
2023-04-23flutter.buildFlutterApplication: Manually supply the dependency listhacker10241-2/+19
This removes the need for IFD.
2023-04-17flutter.buildFlutterApplication: Supply package metadata to overrideshacker10241-1/+10
2023-04-17flutter.buildFlutterApplication: Introduce a package override repositoryhacker10241-58/+70
Some Flutter packages require additional attribute values to be added to buildFlutterApplication, to add things like libraries and environment variables. To prevent duplication in applications that use the packages, a repository of package overrides is kept. buildFlutterApplication will look for package overrides for each dependency, and apply them by calling overrideAttrs on itself.
2023-04-17flutter.buildFlutterApplication: Allow overriding configuration attributeshacker10241-7/+8
This allows thing like `flutterBuildFlags` and `runtimeDependencies` to be overridden with `overrideAttrs`. Attributes that affect dependency retrieval cannot be overridden.
2023-04-16dart.fetch-dart-deps: Add hook runtime dependencieshacker10241-2/+0
2023-04-16flutter.buildFlutterApplication: Supply runtime dependencieshacker10241-1/+19
This wraps Flutter programs with an appropriate LD_LIBRARY_PATH. For some reason, the RUNPATH of the executable is not used to load dynamic libraries in dart:ffi with DynamicLibrary.open(). This could alternatively be fixed with patchelf --add-needed, but this would cause all the libraries to be opened immediately, which is not what application authors expect. The name of the runtimeDependencies argument was chosen to match autoPatchelfHook, which has a similar feature.
2023-04-16flutter.buildFlutterApplication: Move debugging symbols into another outputhacker10241-1/+3
This reduces the size of the executable. It works well with Nix - if the user includes the version in their bug report, the exact debugging symbols required can easily be found.
2023-04-16flutter.buildFlutterApplication: Add flutterBuildFlags argumenthacker10241-1/+2
2023-04-16flutter.buildFlutterApplication: Allow using a custom pubspec.lockhacker10241-1/+2
2023-04-16flutter.buildFlutterApplication: Refactor dependency setup as a standalone ↵hacker10241-119/+20
derivation with an output hook This allows anything that needs to build a Dart application (such as a future `buildDartApplication` function) to use the same setup.
2023-04-15flutter: Remove cached Git package Git directorieshacker10241-8/+7
Pub does not perform any Git operations on the cached package directly, instead cloning it through a mirror. The .git directories are not needed, and are a source of non-determinism.
2023-04-15flutter: Don't tarball the package cachehacker10241-44/+51
Co-authored-by: FlafyDev <flafyarazi@gmail.com> The dependency fixed-output derivation now uses the recursive hash mode to avoid tarballing and copying all the files. https://github.com/NixOS/nix/issues/6660 was ran into during the development of this change. Input references were found in the Git package cache before nukeReferences was used. It turns out that the mirrors in the Git package cache do not actually need to be preserved, as the SDK does not use them during the build process. They are therefore deleted in the dependency derivation and re-created as blank repositories in the main derivation. A description of the Git package cache layout can be found here: https://github.com/dart-lang/pub/blob/c890afa1d65b340fa59308172029680c2f8b0fc6/lib/src/source/git.dart#L339
2023-04-15flutter.mkFlutterApp: Don't hash more unstable fileshacker10241-24/+4
Files and directories such as .dart_tool, .flutter-plugins, .packages and .pub-cache/hosted/*/.cache will be happily regenerated by the SDK in an offline environment. The patches being made to these files and directories to remove non-determinism were flawed: They did not handle cases where files only appeared in one run, or cases where tooling versions had an effect on the output.
2023-04-14flutter.mkFlutterApp: Remove the target architecture from the dependency ↵hacker10241-1/+1
derivation name As the dependency tarballs no longer include SDK artifacts, they are not platform dependent.
2023-04-14flutter.mkFlutterApp: Add Git to nativeBuildInputshacker10241-0/+2
The deterministic Git script depends on it.
2023-04-14flutter.mkFlutterApp: Don't vendor arbitrary configuration fileshacker10241-16/+14
2023-04-14flutter.mkFlutterApp: Don't use autoPatchelf on package cachehacker10241-9/+1
While this may be beneficial for packages that ship native binaries, this causes issues due to Flutter packages that have inappropriately uploaded build artifacts (such as those from example subprojects) to pub.dev.
2023-04-13mkFlutterApp: Don't fetch prebuilt artifactshacker10241-1/+0
Artifacts are now supplied by the Flutter SDK derivation. In addition, they are no longer a factor in the dependency hash calculation.
2023-04-13mkFlutterApp: Deduplicate build environment setuphacker10241-88/+14
The build environment is now set up by the Flutter wrapper, and does not need to be done in mkFlutterApp.
2023-04-13Merge remote-tracking branch 'NixOS/master' into patch-3hacker10241-3/+4
2023-02-22treewide: move NIX_CFLAGS_COMPILE to the env attrsetArtturin1-1/+1
with structuredAttrs lists will be bash arrays which cannot be exported which will be a issue with some patches and some wrappers like cc-wrapper this makes it clearer that NIX_CFLAGS_COMPILE must be a string as lists in env cause a eval failure
2023-01-09treewide: {build,host,target}Platform -> stdenv.{build,host,target}PlatformArtturin1-2/+1
2022-12-02mkFlutterApp: support apps which don't produce a .packagesLuke Granger-Brown1-2/+3
2022-11-14flutter.mkFlutterApp: Don't use .packageshacker10241-2/+1
This file is deprecated, unused, and not generated in newer Flutter versions.
2022-11-14flutter.mkFlutterApp: Use wrapped Flutter package during buildhacker10241-1/+1
This ensures that all runtime dependencies are supplied.
2022-02-23flutter.mkFlutterApp: fix installing .desktopMaciej Krüger1-1/+2
Previously this was pulling from $built, which got moved to $out/app, so the glob didn't do anything. Now uses find on $out/app
2022-02-23flutter.mkFlutterApp: allow extra fetch commandsMaciej Krüger1-0/+2
Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
2022-02-23flutter.mkFlutterApp: disable fetch buildPhaseMaciej Krüger1-0/+4
Otherwise it tries to run some other commands, this prevents that Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
2022-02-19flutter.mkFlutterApp: initMaciej Krüger1-0/+277
Co-authored-by: Sandro <sandro.jaeckel@gmail.com>