Commit Graph

114 Commits

Author SHA1 Message Date
hacker1024
6af167f231 flutter: Keep 3.7 available 2023-05-12 23:09:41 +10:00
hacker1024
97b7363358 flutter: Append to search paths in the wrapper
Appending to search paths allows dependencies to be replaced at runtime.

This is useful, for example, to the Dart packaging mechanism, which supplies a wrapped version of Git that spoofs cached Git package revisions for Pub.
2023-05-12 23:09:41 +10:00
hacker1024
7f36f6e96b flutter: 3.7.12 -> 3.10.0 2023-05-12 23:09:41 +10:00
hacker1024
6b30711c43
flutter: Install Android variant artifacts in platform subdirectories (#231296)
* flutter: Allow installing artifacts in subdirectories

* flutter: Install Android variant artifacts in platform subdirectories
2023-05-11 23:55:11 +02:00
Maciej Krüger
429d14f15f
Merge pull request #228467 from gilice/expose-mkFlutter 2023-05-02 13:34:00 +02:00
gilice
596aa930b2 flutter: rename & expose builders to pkgs
The renames are:
  mkFlutter -> mkCustomFlutter
  flutterDrv -> mkFlutter

I hope this will bring more clarity
2023-04-30 18:33:05 +02:00
hacker1024
f151560cf0 flutter: package-overrides: olm: init 2023-04-26 16:54:06 +10:00
hacker1024
04ed017ad7 flutter: package-overrides: matrix: init 2023-04-26 16:53:53 +10:00
hacker1024
ad510f4221 flutter: package-overrides: handy_window: init 2023-04-26 16:53:43 +10:00
hacker1024
26e9b52d94 flutter: package-overrides: flutter_secure_storage_linux: init 2023-04-26 16:53:33 +10:00
hacker1024
7fb8a68efa flutter: Fix linux-x64-profile/linux-x64-flutter-gtk artifact hash
This was accidentally copied from linux-x64-release.
2023-04-26 00:55:10 +10:00
hacker1024
f7af9373ed flutter: Generate target PKG_CONFIG_PATH at build time 2023-04-25 14:40:29 +10:00
hacker1024
552e3fe498 flutter: Don't use IFD to read the engine version 2023-04-23 14:44:46 +10:00
hacker1024
ae0aff848f flutter: Throw a useful message when there are missing artifact hashes 2023-04-23 14:43:48 +10:00
hacker1024
7e53598823 flutter: 3.7.11 -> 3.7.12 2023-04-23 14:30:37 +10:00
hacker1024
0495725a1f flutter.buildFlutterApplication: Introduce a package override repository
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-17 03:21:01 +10:00
hacker1024
17cb291df1 flutter: Allow adding extra dependencies to the wrapper
Flutter application derivations can add dependencies and build flags, but it's not as easy during development.

As an alternative to nix-shell, a custom Flutter wrapper can be built with dependencies required by projects.

This feature builds on the existing build environment setup techniques required for Linux desktop support, so is fairly cheap to maintain.
2023-04-16 21:20:25 +10:00
hacker1024
607a57d48e flutter.mkFlutterApp: Rename to flutter.buildFlutterApplication
This fits more appropriately with other build derivations like buildPythonApplication.
2023-04-15 20:57:21 +10:00
hacker1024
b187edb802 flutter: Pass through the version attribute in the wrapper 2023-04-15 19:25:01 +10:00
hacker1024
62e50080f3 flutter: Download engine artifacts individually
This brings the following benefits:
- Artifacts missing in the SDK tarball (such as prebuilts for linux-aarch64) can be obtained
- Artifacts can be patched more granularly (e.g. libflutter_linux_gtk is patchelf-ed for GTK3, and the linux-aarch64 assets have a postPatch to add some missing files)
- Minimal Flutter packages can be generated (e.g. mkFlutterApp only needs prebuilts for desktop Linux, and developers that don't care for desktop Linux can exclude the artifacts and dependencies)

It also paves the way for including manually built engine facts.
2023-04-15 02:09:28 +10:00
hacker1024
c3797393b7 flutter: Use fetchzip instead of fetchurl for source downloads
This allows for speedier re-use of the source archives, and lets files inside be read in Nix.
2023-04-15 01:52:30 +10:00
hacker1024
b16e344fae flutter: Remove --no-version-check from the immutable wrapper
This is not technically needed anyway, as the feature is removed in disable-auto-update.patch.

Prepending this argument causes issues:
- https://github.com/kevmoo/completion.dart/issues/33
- https://github.com/flutter/flutter/issues/124793
2023-04-14 15:11:31 +10:00
hacker1024
1b2cac51b2 flutter: Use existing libdeflate derivation 2023-04-14 14:21:38 +10:00
hacker1024
cedcb0b772 flutter: Rename "self" to "unwrapped" in main derivation 2023-04-13 23:19:16 +10:00
hacker1024
13bbb36132 flutter: Move makeWrapper to nativeBuildInputs in wrapper 2023-04-13 22:52:40 +10:00
hacker1024
c59ce54f1d flutter: Add mkFlutterApp as a passthru attribute 2023-04-13 22:02:50 +10:00
hacker1024
4196ddbeb5 flutter: Add git and which to PATH 2023-04-13 21:55:50 +10:00
hacker1024
f3aac6e61e flutter: Add FlafyDev, gilice, and hacker1024 as maintainers 2023-04-13 19:46:45 +10:00
hacker1024
4df7d07ab1 flutter: Remove stray dollar sign from name string 2023-04-13 19:29:42 +10:00
hacker1024
d5aa0c1f97 Merge remote-tracking branch 'NixOS/master' into patch-3 2023-04-13 19:22:50 +10:00
hacker1024
5777f1a122 flutter: Don't check executable locations in doctor
Flutter 3.5.0 adds a check to make sure that the Flutter and Dart tool executables are inside the SDK directory.

This does not play nicely with the wrapping and linking techniques used to package it. It is also impossible for there to be an issue related to binary locations, as everything is set up properly in the derivation.
2023-04-13 18:02:26 +10:00
hacker1024
0f2848638f flutter: 3.3.3 -> 3.7.11 2023-04-13 18:01:58 +10:00
hacker1024
aa9079c678 flutter: Remove prebuilt dependencies from the wrapper
These are no longer needed now that the artifacts are patched.
2023-04-13 18:01:58 +10:00
hacker1024
7f01352e65 flutter: Don't preserve prebuilt SDK asset file permissions
See: https://github.com/flutter/flutter/issues/119961

Co-authored-by: FlafyDev <flafyarazi@gmail.com>
Co-authored-by: gilice <gilice@proton.me>
Co-authored-by: hacker1024 <hacker1024@users.sourceforge.net>
2023-04-13 18:01:53 +10:00
hacker1024
9497627b15 flutter: Don't try to update the immutable artifact cache
Co-authored-by: FlafyDev <flafyarazi@gmail.com>
Co-authored-by: gilice <gilice@proton.me>
Co-authored-by: hacker1024 <hacker1024@users.sourceforge.net>
2023-04-13 18:01:45 +10:00
hacker1024
d6ce0dafcf flutter: Don't use an external artifact cache
The internal artifacts should be used, as they have been patched to use Nix libraries.

Co-authored-by: FlafyDev <flafyarazi@gmail.com>
Co-authored-by: gilice <gilice@proton.me>
Co-authored-by: hacker1024 <hacker1024@users.sourceforge.net>
2023-04-13 18:01:35 +10:00
hacker1024
e552959395 flutter: Remove the FHS wrapper
Now that Flutter artifacts are patched, there is no need for a FHS at runtime or any stage of the build process.

Those relying on it for the Android SDK should look at https://github.com/tadfisher/android-nixpkgs.
2023-04-13 18:01:32 +10:00
hacker1024
9e33e35589 flutter: Add zlib to the linker search path 2023-04-13 18:01:32 +10:00
hacker1024
94a34aadf6 flutter: Use autoPatchelfHook for SDK artifacts
This allows SDK artifacts (including build tools and libraries) to use the right interpreter and library locations, abolishing the need for a FHS or post-build patches.

`autoPatchelf` has been used through `autoPatchelfHook`, instead of the `autoPatchelf` command on just the artifact directory, due to the latter method not patching interpreter paths (https://discourse.nixos.org/t/trying-to-use-autopatchelf/24003).

Co-authored-by: FlafyDev <flafyarazi@gmail.com>
Co-authored-by: gilice <gilice@proton.me>
Co-authored-by: hacker1024 <hacker1024@users.sourceforge.net>
2023-04-13 18:01:25 +10:00
hacker1024
65708c3360 flutter: Don't delete SDK artifacts
Co-authored-by: FlafyDev <flafyarazi@gmail.com>
Co-authored-by: gilice <gilice@proton.me>
Co-authored-by: hacker1024 <hacker1024@users.sourceforge.net>
2023-04-13 18:01:01 +10:00
hacker1024
cda91ab269 flutter: Add cache output and preload pub cache when necessary
Co-authored-by: FlafyDev <flafyarazi@gmail.com>
Co-authored-by: gilice <gilice@proton.me>
Co-authored-by: hacker1024 <hacker1024@users.sourceforge.net>
2023-04-13 17:55:40 +10:00
hacker1024
7840f2055a flutter: Create the flutter derivation with callPackage alone 2023-04-13 00:09:42 +10:00
hacker1024
341fa709ff flutter: Redesign wrapping architecture
The following principles are now in place:

- All wrappers will include SDK file symlinks. There is not much of a reason to not do so, and removing the option to omit it makes it easier to understand what each wrapper does.
- There is no longer a way to get the previous derivation from a wrapper. This could yield unexpected results based on the wrapping order. Instead, "sdk", "unwrapped", and "noFHS" passthru attributes are provided where appropriate.
2023-02-18 00:43:17 +11:00
hacker1024
aa33cb9956 flutter: Reorganize the wrapper code 2023-02-17 23:55:13 +11:00
hacker1024
240d9bdf43 flutter: Properly set linker flags in wrapper 2023-02-17 22:48:41 +11:00
hacker1024
1d547baee0 flutter: Do not rely on pkg-config setup hook to build search path 2023-02-08 16:11:26 +11:00
hacker1024
fd46552867 flutter: Add libdeflate to build environment 2023-02-08 15:27:18 +11:00
Guillaume Girol
33afbf39f6 treewide: switch to nativeCheckInputs
checkInputs used to be added to nativeBuildInputs. Now we have
nativeCheckInputs to do that instead. Doing this treewide change allows
to keep hashes identical to before the introduction of
nativeCheckInputs.
2023-01-21 12:00:00 +00:00
Thiago Kenji Okada
c1aa02a83d
Merge pull request #200988 from hacker1024/patch-2
flutter: Expose internal derivation creation functions
2023-01-08 15:17:18 +00:00
Bobby Rong
8eab68f943
Merge pull request #199767 from h7x4/master
flutter, mozart: add h7x4 as maintainer
2022-11-23 23:56:47 +08:00