Skip to content

flutter: improve build determinism - #575372

Open
me-and wants to merge 2 commits into
NixOS:masterfrom
me-and:flutter-determinism
Open

me-and wants to merge 2 commits into
NixOS:masterfrom
me-and:flutter-determinism

Conversation

@me-and

@me-and me-and commented Oct 17, 2026 •

Copy link
Copy Markdown
Member

Two changes here:

Things done

When it generates the Bash/Zsh completion files, Flutter includes the
current date and time in a comment, which means the build output differs
every time it's run.  Make the build deterministic by deleting that line
from the generated script.

Fixes NixOS#575354
@nixpkgs-ci
nixpkgs-ci Bot requested review from a team, RossComputerGuy and ericdallo October 17, 2026 19:30
@nixpkgs-ci nixpkgs-ci Bot added 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux. 10.rebuild-darwin: 11-100 This PR causes between 11 and 100 packages to rebuild on Darwin. 6.topic: flutter Open-source UI software development kit for cross-platform applications labels Oct 17, 2026
@me-and

me-and commented Oct 17, 2026

Copy link
Copy Markdown
Member Author

npb · f20cd90 → 1cd3ab4

Expand this for a reproducible command.
npb --base f20cd90e28fe0403873f473b29e42662cd86e8c4 --head 1cd3ab4557e2d49fdcd69b28d87f355da27c0fdb -s x86_64-linux
Expand this for a legend of all symbols below.
  • ✅ = successfully built
  • ❌ = failed to build
  • 🚫 = dependency failed to build
  • ❔ = couldn't try to build
  • ⏩ = failed to evaluate
  • ➖ = doesn't exist

x86_64-linux

✅ → ✅ · 74 packages (57 unique)
  • alisthelper
  • badgemagic-app
  • bluebubbles
  • butterfly
  • chameleonultragui
  • commet-chat
  • convertall
  • cwtch-ui
  • ente-auth
  • finamp
  • firmware-updater
  • fladder
  • flet-client-flutter
  • fluffychat-web
  • fluffychat
  • flutter329 = flutterPackages.v3_29 = flutterPackages-bin.v3_29
  • flutter332 = flutterPackages.v3_32 = flutterPackages-bin.v3_32
  • flutter335 = flutterPackages.v3_35 = flutterPackages-bin.v3_35
  • flutter338 = flutterPackages.v3_38 = flutterPackages-bin.v3_38
  • flutter341 = flutterPackages.v3_41 = flutterPackages-bin.v3_41
  • flutter344 = flutterPackages.v3_44 = flutterPackages-bin.v3_44
  • flutter = flutter347 = flutterPackages.v3_47 = flutterPackages.stable = flutterPackages-bin.v3_47 = flutterPackages-bin.stable
  • gopeed
  • hover
  • interstellar
  • intiface-central
  • jellyflix
  • kazumi
  • kelivo
  • libretrack
  • localsend.tests.localsend
  • localsend
  • mangayomi
  • mhabit
  • musicpod
  • nordvpn
  • oneanime
  • onyx
  • pana.tests.json-output
  • pana.tests.usage
  • pana
  • pied
  • piliplus
  • plezy
  • proxypin
  • quickgui
  • recon
  • rustdesk-flutter
  • saber
  • server-box
  • sideswap
  • simple-live-app
  • sly
  • tts-mod-vault
  • windsend
  • wox
  • yubioath-flutter

The build process for Flutter includes creating a Git repository, then
running the `make_deterministic_repo` function from Nixpkgs' `fetchgit`
on that repository.  However, the repository doesn't directly impact
anything in the final output, so there's no benefit to calling the
function.  Further, `make_deterministic_repo` doesn't work when using
versions of Git compiled with breaking changes (that is, the changes
that are currently opt-in, but will be required by Git v3).

Avoid the unnecessary work and work around `make_deterministic_repo`
being broken with some builds of Git by removing this step.

Fixes NixOS#575366
@me-and

me-and commented Oct 18, 2026

Copy link
Copy Markdown
Member Author

And with overlays added to confirm the fix with Git built with withBreakingChanges = true, plus a couple of extra overlays to back-apply parts of #573962 and #567405 that are necessary for Git to build in this environment but which haven't yet made it out of staging:

npb · f20cd90 → 1cd3ab4

Expand this for a reproducible command.
npb --base f20cd90e28fe0403873f473b29e42662cd86e8c4 --head 1cd3ab4557e2d49fdcd69b28d87f355da27c0fdb --overlay 'final: prev: { git = prev.git.override { withBreakingChanges = true; }; }' --overlay 'final: prev: { gitMinimal = final.git.override { withManual = false; osxkeychainSupport = false; pythonSupport = false; perlSupport = false; withpcre2 = false; cargo = final.cargo.override { auditable = false; }; curl = if final.stdenv.hostPlatform.isFreeBSD then final.curlMinimal else final.curl; }; }' --overlay 'final: prev: { pythonPackagesExtensions = prev.pythonPackagesExtensions ++ [ (pyfinal: pyprev: { hatch-vcs = pyprev.hatch-vcs.overridePythonAttrs { doCheck = false; }; }) ]; }' -s x86_64-linux
Expand this for a legend of all symbols below.
  • ✅ = successfully built
  • ❌ = failed to build
  • 🚫 = dependency failed to build
  • ❔ = couldn't try to build
  • ⏩ = failed to evaluate
  • ➖ = doesn't exist

x86_64-linux

🚫 → 🚫 · 2 packages
  • bluebubbles
  • simple-live-app
🚫 → ✅ · 72 packages (55 unique)
  • alisthelper
  • badgemagic-app
  • butterfly
  • chameleonultragui
  • commet-chat
  • convertall
  • cwtch-ui
  • ente-auth
  • finamp
  • firmware-updater
  • fladder
  • flet-client-flutter
  • fluffychat-web
  • fluffychat
  • flutter329 = flutterPackages.v3_29 = flutterPackages-bin.v3_29
  • flutter332 = flutterPackages.v3_32 = flutterPackages-bin.v3_32
  • flutter335 = flutterPackages.v3_35 = flutterPackages-bin.v3_35
  • flutter338 = flutterPackages.v3_38 = flutterPackages-bin.v3_38
  • flutter341 = flutterPackages.v3_41 = flutterPackages-bin.v3_41
  • flutter344 = flutterPackages.v3_44 = flutterPackages-bin.v3_44
  • flutter = flutter347 = flutterPackages.v3_47 = flutterPackages.stable = flutterPackages-bin.v3_47 = flutterPackages-bin.stable
  • gopeed
  • hover
  • interstellar
  • intiface-central
  • jellyflix
  • kazumi
  • kelivo
  • libretrack
  • localsend.tests.localsend
  • localsend
  • mangayomi
  • mhabit
  • musicpod
  • nordvpn
  • oneanime
  • onyx
  • pana.tests.json-output
  • pana.tests.usage
  • pana
  • pied
  • piliplus
  • plezy
  • proxypin
  • quickgui
  • recon
  • rustdesk-flutter
  • saber
  • server-box
  • sideswap
  • sly
  • tts-mod-vault
  • windsend
  • wox
  • yubioath-flutter

@me-and

me-and commented Oct 18, 2026 •

Copy link
Copy Markdown
Member Author

The two packages that are still failing in the second npb results above are at least in part due to #571330, and therefore will be fixed by #574373.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: flutter Open-source UI software development kit for cross-platform applications 10.rebuild-darwin: 11-100 This PR causes between 11 and 100 packages to rebuild on Darwin. 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Build failure: flutter.passthru.unwrapped if Git has withBreakingChanges = true Unreproducible Package: flutter.passthru.unwrapped

1 participant