Change:
<!-- Note that these are hard requirements --<!-- You can use the "Go to file" functionality on github to find the package Then you can go to the history for this package Find the latest "packagename: oldversion -newversion" commit The "newversion" is the the current version of the package --- <!-- Type the name of your package and try to find an open pull request for the package If you find an open pull request, you can review it! There's a high chance that you'll have the new version right away while helping the community! --- name: legacyPackages.x86_64-linux.flutter <!-- The current version can be found easily with the same process than above for checking the master branch If an open PR is present for the package, take this version as the current one and link to the PR --current version: 2.2.1 desired version: 2.5.1 <!-- Search your package here: If no maintainer is listed for your package, tag the person that last updated the package --maintainers: Please tag this issue in your PR.
Besides updating it we could setup a to easily auto update it
I opened , it's not easy to create the updateScript though, I can try adding later in another PR

Discussion:
getPatches = dir: let files = builtins.attrNames (builtins.readDir dir); in map (f: dir + ("/" + f)) files; <del> version = "2.2.1"; </del> <ins> version = "2.5.1"; </ins> channel = "stable"; filename = "flutter_linux_${version}-${channel}.tar.xz"; <del> in { </del> <ins> # Decouples flutter derivation from dart derivation, # use specific dart version to not need to bump dart derivation when bumping flutter. dartVersion = "2.14.2"; dartSourceBase = "https://storage.googleapis.com/dart-archive/channels"; dartForFlutter = dart.override { version = dartVersion; sources = { "${dartVersion}-x86_64-linux" = fetchurl { url = "${dartSourceBase}/stable/release/${dartVersion}/sdk/dartsdk-linux-x64-release.zip"; sha256 = "1gr2dr683kz0a0k6rcn4jcbxf9fr2xlzi5fcgn1lzrrxvys2lddx"; }; }; }; in { </ins> mkFlutter = mkFlutter; stable = mkFlutter rec { <del> inherit dart version; </del> <ins> inherit version; dart = dartForFlutter; </ins> pname = "flutter"; src = fetchurl { <del> url = "https://storage.googleapis.com/flutter_infra/releases/${channel}/linux/${filename}"; sha256 = "009pwk2casz10gibgjpz08102wxmkq9iq3994b3c2q342g6526g0"; </del> <ins> url = "https://storage.googleapis.com/flutter_infra_release/releases/${channel}/linux/${filename}"; sha256 = "12ycz7iasrc9p9c6zr95l6llyji3za43gsx8cmr2kjfiv23bcrv2"; </ins> }; patches = getPatches ./patches; };

{ bash , buildFHSUserEnv , cacert <del> , coreutils </del> , git , runCommand , stdenv , lib <del> , fetchurl </del> , alsa-lib , dbus , expat

, nspr , nss , systemd <ins> , which </ins> }: let drvName = "flutter-${version}";

''; installPhase = '' <ins> runHook preInstall </ins> mkdir -p $out cp -r . $out mkdir -p $out/bin/cache/ ln -sf ${dart} $out/bin/cache/dart-sdk <ins> runHook postInstall ''; doInstallCheck = true; installCheckInputs = [ which ]; installCheckPhase = '' runHook preInstallCheck export HOME="$(mktemp -d)" $out/bin/flutter config --android-studio-dir $HOME $out/bin/flutter config --android-sdk $HOME $out/bin/flutter --version | fgrep -q '${version}' runHook postInstallCheck </ins> ''; };