Commit Graph

42 Commits

Author SHA1 Message Date
hacker1024
4a7fb2c8ea Revert "flutterPackages: refactor"
This reverts commit fe90d5a666.
2026-04-12 20:41:26 +10:00
kyehn
fe90d5a666 flutterPackages: refactor 2026-04-03 08:09:50 +00:00
Boris Nagaev
32813062aa flutter: do not log /etc/os-release read error
Apps using flutter may fail to build with this error:
Failed obtaining PRETTY_NAME for Linux: PathNotFoundException: Cannot open file,
path = '/usr/lib/os-release' (OS Error: No such file or directory, errno = 2)

Nix build sandbox doesn't have /usr/lib/os-release and /etc/os-release files.
2025-06-22 10:58:15 -03:00
Tristan Ross
a2b56cd6e0 flutterPackages.v3_24: fix patches 2024-08-22 18:27:57 -07:00
FlafyDev
d77999079f flutter: remove unnecessary git-dir.patch
Flutter still works like normal with the patch `git-dir.patch` removed.
I'm not sure what it's supposed to do but I don't think it's necessary anymore.
2024-02-17 15:34:10 +02:00
Janne Heß
5dfd5ecc84 flutter313: Fix aarch64-darwin 2024-02-11 18:28:40 +01:00
FlafyDev
15b87fdcd9 flutter: 3.13.8 -> 3.16.7 2024-01-15 16:26:36 +02:00
FlafyDev
5e99fd3304 flutter: Move to a structure more fitting for multiple versions 2024-01-15 01:35:45 +02:00
FlafyDev
b73ceb1ca7 flutter: Make it possible to override operatingSystem internally
Makes it possible to get artifact hashes for other system platforms.

Useful for an update script.
2024-01-15 01:35:45 +02:00
hacker1024
d8b20d93ad flutter: Remove FLUTTER_CACHE_DIR 2023-12-21 11:46:16 +01:00
hacker1024
c524427335 flutter: Set host platform at compilation
The Flutter CLI normally detects the host platform at runtime, but this results in incorrect behaviour in the Nix build environment.
2023-12-21 11:46:14 +01:00
hacker1024
59493e57ed flutter: Deregister the Pub dependencies artifact
There is no need to cache the flutter_tool pub dependencies, as it is built reproducibly with Nix.
2023-12-21 11:44:13 +01:00
hacker1024
e13356db8e flutter: Disable automatic updates without breaking precache 2023-12-21 11:44:12 +01:00
hacker1024
41bbc2c311 flutter: Supply CA bundle in sandbox 2023-08-29 13:12:01 +02: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
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
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
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
nanashi0x74
4a74e239b5 flutter: add flutter2 package 2022-10-02 19:33:26 +02:00
nanashi0x74
41754242a6 flutter: add cache back in for shaders 2022-09-14 18:50:39 +02:00
nanashi0x74
747f298be5 flutter: regenerate move-cache.patch 2022-09-14 18:50:39 +02:00
nanashi0x74
89de698218 flutter: regenerate git-dir.patch 2022-09-14 18:50:38 +02:00
nanashi0x74
bd0f733ce1 flutter: regenerate disable-auto-update.patch 2022-09-14 18:50:38 +02:00
nanashi0x74
43d2b91944 flutter: amend move-cache patch after update 2022-07-11 14:02:36 +02:00
nanashi0x74
02e10382d5 flutter: patch git version check 2022-07-11 14:02:36 +02:00
Luke Granger-Brown
9dcf20f284 flutter: 2.8.0 -> 2.10.0 2022-02-06 21:03:45 +00:00
Eric Dallo
70bbf1e9b2 flutter: fix move-cache patch 2021-12-25 10:54:51 -03:00
Eric Dallo
f6da7b4007 flutter: 2.5.1 -> 2.8.0 2021-12-11 14:16:59 -03:00
nanashi0x74
d05d2113bb flutter: 2.0.3 -> 2.2.1 2021-06-10 20:30:03 +02:00
kolaente
3be901912d flutter 1.22.4 -> 2.0.3 2021-03-21 14:06:57 +01:00
Thiago Kenji Okada
5f72a823de flutter: 1.22.4 -> 1.22.5
Needs to do a build in 2-pass now since Google stopped shipping all
dependencies needed to build Flutter. This may be an oversight from them
since they used to ship everything, but this makes the whole build
process more robust.

The first step will download all dependencies from pub, and the
second step will build Flutter. Since we need to build repository
first, we also require a new depsSha256 parameter to be passed, that
represents the SHA256 of the resulting derivation of all Flutter
dependencies downloaded from https://pub.dev.

This commit also makes some changes in mkFlutter, allowing the
user to pass src instead of passing version/channel/filename, allowing
for more flexibility (i.e: building from a local fork of Flutter).
2021-01-27 14:48:10 -03:00
Thiago Kenji Okada
ec644e05cb flutter: remove non-stable versions
Related issue #108606.

Nowadays we have multiple outdated versions of Flutter in nixpkgs.
Instead, let's focus in having in having stable versions of Flutter
working.

Users needing to use beta or dev versions of Flutter can use mkFlutter
function, that still exists.
2021-01-27 14:48:06 -03:00
Eric Dallo
bee3fb885f flutter: Add dart cache to flutter 2020-10-30 09:58:06 -03:00
kolaente
615437a54c Fix removing flutter upgrade 2020-06-17 18:42:14 +02:00
kolaente
b83408b976 flutter packages update 2020-06-17 18:27:50 +02:00
Bastien Rivière
8986e95dca flutter: update channels + fix dev channel 2020-04-05 15:35:11 +02:00
Bastien Rivière
4e0d07f6d7 flutter: symlink common patches 2020-03-29 14:25:16 +02:00
Bastien Rivière
d037e64ef6 flutter: init 1.12.13+hotfix.8
flutter: add beta and dev channels

flutter: artifacts are now downloaded in $HOME/.cache/flutter

flutter: remove all artifacts from flutter

flutter: fix lockfile path

flutter: fix pub_cache

flutter: fix flutter_tools/.packages pointing to /build

flutter: clean patches

flutter: fix write error on .cache/flutter/lockfile

flutter: add zlib as a dependency

flutter: add missing dependencies

flutter: fix flutter version

flutter: update versions + dependencies
2020-03-27 23:21:06 +01:00