Commit Graph

139 Commits

Author SHA1 Message Date
Maciej Krüger
6cecfa12b5
Merge pull request #239570 from hacker1024/feature/flutter-wrapper-gapps
flutter: Use wrapGAppsHook
2023-09-20 23:34:26 +02:00
Maciej Krüger
ac7c3b5a19
Merge pull request #251568 from hacker1024/patch-5
flutter: Pass through engineArtifacts in wrapper
2023-09-20 23:27:51 +02:00
gilice
64b86c1a19 flutter: 3.13.0 -> 3.13.4 2023-09-19 17:18:05 +02:00
gilice
c511f60c48 flutter: 3.13.0 -> 3.13.4 2023-09-19 08:27:14 +00:00
gilice
bf1c8043b0 flutter: remove myself from maintainers
I don't have the time for this anymore.
2023-09-13 17:37:52 +02:00
Maciej Krüger
b9ab9a92b9
Merge pull request #251409 from gilice/flutter-313 2023-08-30 22:00:14 +02:00
hacker1024
98fa8a27f6 flutter: Remove artifact hashes for 3.10.5 engine 2023-08-29 13:12:13 +02:00
hacker1024
f5a2f237de flutter37: Drop 2023-08-29 13:12:11 +02:00
hacker1024
41bbc2c311 flutter: Supply CA bundle in sandbox 2023-08-29 13:12:01 +02:00
hacker1024
84347c2195 flutter: Use wrapGAppsHook
Flutter's Linux desktop embedding uses GTK. wrapGAppsHook should be used.
2023-08-28 11:59:44 +10:00
gilice
40e82051b9 flutter: 3.10.5 -> 3.13.0
flutter: Update remaining engine artifact hashes for v3.13.0

Co-Authored-By: hacker1024 <20849728+hacker1024@users.noreply.github.com>
2023-08-27 16:06:45 +02:00
hacker1024
0df5c9a81d
flutter: Pass through engineArtifacts in wrapper 2023-08-26 10:29:37 +00:00
Pol Dellaiera
3eb7f7a63b
Merge pull request #248683 from oxij/tree/source-root-continues-3
treewide: cleanup `sourceRoot` and `setSourceRoot` usage
2023-08-15 05:53:52 +02:00
Luke Granger-Brown
19cd58a6ca flutter37: fix skyNotice hash for version 1a65d409c7a1438a34d21b60bf30a6fd5db59314
Using fetchurl like this means that, if you build the `flutter`
derivation first, you will get a file named "LICENSE" in your store with
the correct hash. `flutter37` will then build because this file is
already in your store, even though the LICENSE to which _it_ refers is
different. This is dangerous in this case - but an intentional design
decision in the way fetchurl works to allow artifacts which are the same
to be fetched from arbitrary sources, or even pre-populated into the
store.

To avoid this, explicitly tag the fetchurl with a name and the commit
hash we're fetching from. This means we _must_ fetch these separately
for each flutter version and avoids the problem of accidentally reusing
artifacts for a different build.
2023-08-13 14:30:43 +01:00
Jan Malakhovski
b358ebd870 treewide: replace setSourceRoot = "sourceRoot=$PWD" and similar with sourceRoot = "." 2023-08-12 08:29:55 +00:00
gilice
c34385b52c flutter: link notices to all of the artifact directories.
The flutter team has also started doing this, but only for new
artifacts. This way, we also do it for older artifacts.
2023-08-11 10:03:39 +02:00
Sunghoon Kang
37a10c3cb7
flutter: revert unnecessary extension extraction
Signed-off-by: Sunghoon Kang <me@hoon.dev>
2023-07-07 16:59:52 +09:00
Sunghoon Kang
77618bd28b
flutter: revert patch changes
Signed-off-by: Sunghoon Kang <me@hoon.dev>
2023-07-07 16:56:40 +09:00
Sunghoon Kang
8cb8349928
flutter: fix hash
Signed-off-by: Sunghoon Kang <me@hoon.dev>
2023-07-07 13:16:43 +09:00
Sunghoon Kang
77702747e7
flutter: add darwin support
Signed-off-by: Sunghoon Kang <me@hoon.dev>
2023-07-07 13:07:34 +09:00
Ilan Joselevich
d625c36563
Merge pull request #240715 from FlafyDev/flutter-cache-drv-2
flutter: Separate cache and unwrapped derivations #2
2023-07-05 03:03:27 +03:00
hacker1024
309f54ae5b flutter: Remove Flutter 2 2023-07-04 08:59:01 +10:00
FlafyDev
570f3efd1d flutter: Separate cache and unwrapped derivations
flutter-unwrapped will now not come with engine artifacts in its cache directory(`$out/bin/cache`).

To specify a different cache directory, set FLUTTER_CACHE_DIR.

Flutter's wrapper now sets FLUTTER_CACHE_DIR to set engine artifacts.

The sh file `$out/bin/internal/shared.sh` runs when launching Flutter and calls `"$FLUTTER_ROOT/bin/cache/` instead of our environment variable `FLUTTER_CACHE_DIR`.
I decided not to patch it since the script doesn't require engine artifacts(which are the only thing not added by the unwrapped derivation), so it shouldn't fail, and patching it will just be harder to maintain.
2023-06-30 15:23:34 +03:00
gilice
dcf789f53e flutter: 3.10.0 -> 3.10.5 2023-06-14 19:12:50 +02:00
FlafyDev
b1efbff8ec flutter: Move artifact installation logic to the wrapper 2023-05-15 01:16:47 +03:00
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