maximoffua / flutter.nix

A flake for flutter package out of nixpkgs.
The Unlicense
15 stars 7 forks source link

latest flutter version is 3.24.0, but latest tag here is 3.22.2 #20

Open cguentherTUChemnitz opened 1 month ago

cguentherTUChemnitz commented 1 month ago

latest flutter version is 3.24.0, but latest tag here is 3.22.2

jeanlucthumm commented 1 month ago

Here's an LLM speculating on the update process:

To update this Flutter package from version 3.22 to 3.24, you would typically follow these steps:

  1. Update version numbers:

    1. In pkgs/flutter/sources/data.json, update the version field to "3.24.0" (or the specific 3.24.x version).
    2. Update the engineVersion to match the new Flutter version's engine.
  2. Update source hash:

    1. Fetch the new Flutter source and update the flutterHash in the same JSON file.
  3. Update Dart version:

    1. Check if the Dart version needs to be updated. This is usually specified in the Flutter SDK's bin/internal/dart-sdk.version file.
    2. If needed, update the Dart version in pkgs/dart/sources.nix.
  4. Update artifact hashes:

    1. The pkgs/flutter/artifacts/hashes.nix file will need updating with new hashes for the 3.24 artifacts.
    2. You might need to run the artifact fetching process for each platform and collect the new hashes.
  5. Update pubspec.lock:

    1. The pubspecLock in pkgs/flutter/sources/data.json might need updating to match the new version's dependencies.
  6. Check for breaking changes:

    1. Review the Flutter 3.24 changelog for any breaking changes that might affect the build process or wrapper scripts.
  7. Test and verify:

    1. Build the updated package and test it to ensure everything works correctly.
  8. Update related files:

    1. Check if any patches in pkgs/flutter/patches need updating or if new ones are required.
  9. Run update scripts:

    1. Use the updateScript mentioned in pkgs/flutter/wrapper.nix to automate parts of this process.

To perform these updates, you could:

  1. Modify the update/update.py script to fetch the new 3.24 version.
  2. Run the script to update version numbers and fetch new sources.
  3. Manually verify and adjust any changes that the script couldn't handle automatically.
  4. Use the try-prefetch.nix file to help generate new artifact hashes.
  5. Test the updated package thoroughly before submitting the changes.

Don't currently have time to do it but maybe it'll help someone

jeanlucthumm commented 1 month ago

Note also #18

maximoffua commented 1 week ago

The new Flutter versions just don't build with this flake. I am stuck on trying to fix it, as the flutter here is not able to download artifacts trying a wrong URL during nix build .

I have switched to nixpkgs, as it seems to be fixed there (Android build) since Flutter 3.24.

maximoffua commented 1 week ago

It is also makes it super easy to use with a new option in devenv:

{ pkgs, ... }:

{
  android = {
    enable = true;
    flutter.enable = true;
    platforms.version = [ "32" "33" "34" ];
    buildTools.version = [ "33.0.1" "34.0.0" ];
  };
}