Possible more in-depth replacement for https://github.com/NixOS/nixpkgs/pull/553331 .
I'm admittedly not very familiar with the Dart/Flutter ecosystem, but from a structuredAttrs point of view, I don't like how that PR removes passAsFile (as would be necessary to allow for structuredAttrs), but then re-introduces the implementation detail of ...Path into env.
This - rather large - PR takes a more holistic approach and tries to move the complete ecosystem forward into the strictDeps / structuredAttrs world. As a precedent, tcl, a package set of similar size, has been updated in one big sweep as well.
Walking through the commits:
- dart/flutter: enable strictDeps / structuredAttrs for helper derivations These should be instances of trivially enabling
strictDepsandstructuredAttrson simplerunCommandormkDerivationderivations, where the *Inputs are fixed and limited. - dart: enable strictDeps, enable structuredAttrs This enables
strictDepsandstructuredAttrsfor the dart compiler itself. This should also be relatively safe since it doesn't affect any packages transitively. - dart-source: enable strictDeps, enable structuredAttrs Same, but for
dart-source. - Then three more somewhat trivial PRs for helpers
- buildDartApplication: enable strictDeps, use structuredAttrs instead … This is the part where
passAsFilegets removed andstrictDepsandstructuredAttrsare enabled for the builder. This is a potentially breaking change for out-of-tree packages (and thus gets a release note) but the in-tree packages don't seem to mind (subject to some more in-depth checking). - buildFlutterApplication: enable strictDeps, enable structuredAttrs Same, but for
buildFlutterApplication. - build{Dart,Flutter}Application: make extraWrapProgramArgs a list and … In the spirit of
structuredAttrs, theextraWrapProgramArgsargument should be a list to match other wrapper arguments. - build{Dart,Flutter}Application: add backward compatibility for extraW… Try to provide some grace period for out of tree packages; this could be dropped.
- Migrate all in-tree packages to use the list and clean up explicit
strictDeps/structuredAttrsthat are now set in the builder. - Various small modernizations for packages that use
buildFlutterApplication; these can be dropped or split off.
I've noticed that for my test package butterfly, the output of the build does change: apparently the wrapper processed the GIO_EXTRA_MODULES variable twice (possibly related to the eval?), so removing that seems like an improvement as well.
I.e., on master, the butterfly wrapper starts with:
#! /nix/store/svx59425zxp552p2b8gm11qj5r09b56i-bash-5.3p15/bin/bash -e
GIO_EXTRA_MODULES=${GIO_EXTRA_MODULES:+':'$GIO_EXTRA_MODULES':'}
GIO_EXTRA_MODULES=${GIO_EXTRA_MODULES/':''/nix/store/w70g5ji1q5wrgq8m3jc5rbw555wkanqi-dconf-0.49.0-lib/lib/gio/modules'':'/':'}
GIO_EXTRA_MODULES='/nix/store/w70g5ji1q5wrgq8m3jc5rbw555wkanqi-dconf-0.49.0-lib/lib/gio/modules'$GIO_EXTRA_MODULES
GIO_EXTRA_MODULES=${GIO_EXTRA_MODULES#':'}
GIO_EXTRA_MODULES=${GIO_EXTRA_MODULES%':'}
export GIO_EXTRA_MODULES
GIO_EXTRA_MODULES=${GIO_EXTRA_MODULES:+':'$GIO_EXTRA_MODULES':'}
GIO_EXTRA_MODULES=${GIO_EXTRA_MODULES/':''/nix/store/w70g5ji1q5wrgq8m3jc5rbw555wkanqi-dconf-0.49.0-lib/lib/gio/modules'':'/':'}
GIO_EXTRA_MODULES='/nix/store/w70g5ji1q5wrgq8m3jc5rbw555wkanqi-dconf-0.49.0-lib/lib/gio/modules'$GIO_EXTRA_MODULES
GIO_EXTRA_MODULES=${GIO_EXTRA_MODULES#':'}
GIO_EXTRA_MODULES=${GIO_EXTRA_MODULES%':'}
export GIO_EXTRA_MODULES
[...]
After this PR only one set remains.
Things done
- Built on platform:
- x86_64-linux
- aarch64-linux
- aarch64-darwin
- Tested, as applicable:
- NixOS tests in nixos/tests.
-
Package tests at
passthru.tests. - Tests in lib/tests or pkgs/test for functions and "core" functionality.
-
Ran
nixpkgs-reviewon this PR. See nixpkgs-review usage. -
Tested basic functionality of all binary files, usually in
./result/bin/. - Nixpkgs Release Notes
- Package update: when the change is major or breaking.
- NixOS Release Notes
- Module addition: when adding a new NixOS module.
- Module update: when the change is significant.
- Fits CONTRIBUTING.md, pkgs/README.md, maintainers/README.md and other READMEs.
- Follows the automation/AI policy.
- The commit messages follow the nixpkgs format, like
hello: 2.12 -> 2.13ornixos/nginx: fix the test. Guide metais complete:description,homepage,license,maintainers,mainProgram. Guide- Sources are fixed-output and pinned by a hash. No
lib.fakeHashis left. Guide - A command-line tool has
versionCheckHook, or another check that runs it. Guide meta.platformsmatches what upstream supports. Guide- The tests run:
passthru.tests, the NixOS test of a module, or nixpkgs-review. Guide - AI use is disclosed with an
Assisted-by:trailer. Guide
The title does not start with name:. AI use: none disclosed in the last commit or the description.
Files changed 31
Reviews and comments
I guess we could do this unconditionally?
I think this was a misguided attempt to fix things and can be removed after all. pkg-config is added to depsBuildBuild in the builder to allow libsecret to be found. I'll check this.
nixpkgs-review result
Generated using nixpkgs-review.
Command: nixpkgs-review pr 562933
Commit: 3669eca1ee5cabedb3800c558d1676e92a638ae8
x86_64-linux
<details> <summary>⏩ 3 packages marked as broken and skipped:</summary> <ul> <li>redisinsight</li> <li>rstudio</li> <li>rstudioWrapper</li> </ul></details><details> <summary>⏩ 1 package blacklisted:</summary> <ul> <li>tests.nixos-functions.nixos-test</li> </ul></details><details> <summary>❌ 1 package failed to build:</summary> <ul> <li>tuliprox</li> </ul></details><details> <summary>✅ 102 packages built:</summary> <ul> <li>ags</li> <li>bitwarden-desktop</li> <li>bluebubbles</li> <li>butterfly</li> <li>caelestia-cli</li> <li>caelestia-shell</li> <li>chameleonultragui</li> <li>commet-chat</li> <li>convertall</li> <li>cosmic-settings-daemon</li> <li>adw-gtk3</li> <li>dart (dart-source)</li> <li>dart-bin</li> <li>dart-sass</li> <li>dartHooks.dartFixupHook</li> <li>dart_frog_cli</li> <li>badgemagic-app</li> <li>domine</li> <li>cwtch-ui</li> <li>alisthelper</li> <li>firmware-updater</li> <li>bitfocus-companion</li> <li>bazarr</li> <li>ente-auth</li> <li>flet-client-flutter</li> <li>finamp</li> <li>fluffychat</li> <li>flutter329 (flutterPackages-bin.v3_29, flutterPackages.v3_29)</li> <li>flutter (flutter347, flutterPackages-bin.stable, flutterPackages-bin.v3_47, flutterPackages.stable, flutterPackages.v3_47)</li> <li>fladder</li> <li>flutter332 (flutterPackages-bin.v3_32, flutterPackages.v3_32)</li> <li>flutter335 (flutterPackages-bin.v3_35, flutterPackages.v3_35)</li> <li>flutter338 (flutterPackages-bin.v3_38, flutterPackages.v3_38)</li> <li>flutter341 (flutterPackages-bin.v3_41, flutterPackages.v3_41)</li> <li>fluffychat-web</li> <li>flutter344 (flutterPackages.v3_44, flutterPackages-bin.v3_44)</li> <li>fvm</li> <li>gitbutler</li> <li>homer</li> <li>hover</li> <li>jaspr_cli</li> <li>gitlab</li> <li>gitlab-ee</li> <li>jsonnet</li> <li>jekyll</li> <li>intiface-central</li> <li>gopeed</li> <li>interstellar</li> <li>jellyflix</li> <li>mangayomi</li> <li>melos</li> <li>libretrack</li> <li>kelivo</li> <li>misskey</li> <li>mealie</li> <li>n8n</li> <li>mono_repo</li> <li>kazumi</li> <li>localsend</li> <li>mhabit</li> <li>nixpkgs-manual</li> <li>peertube</li> <li>pana</li> <li>pied</li> <li>nordvpn</li> <li>protoc-gen-dart</li> <li>musicpod</li> <li>oneanime</li> <li>onyx</li> <li>plezy</li> <li>piliplus</li> <li>quartoMinimal</li> <li>proxypin</li> <li>r2modman</li> <li>quarkdown</li> <li>quickgui</li> <li>python314Packages.otter-grader</li> <li>recon</li> <li>quarto</li> <li>rstudioServerWrapper</li> <li>rustdesk-flutter</li> <li>saber</li> <li>shopware-cli</li> <li>serverpod_cli</li> <li>sly</li> <li>server-box</li> <li>sideswap</li> <li>unsure</li> <li>vaultwarden-webvault</li> <li>vikunja</li> <li>vikunja-desktop</li> <li>python313Packages.otter-grader</li> <li>tts-mod-vault</li> <li>vscode-runner</li> <li>webdev</li> <li>voicevox</li> <li>rstudio-server</li> <li>simple-live-app</li> <li>windsend</li> <li>wox</li> <li>yubioath-flutter</li> <li>zammad</li> </ul></details>
<details><summary>tuliprox</summary><pre>warning: struct `PlaylistAssistantContext` is never constructed --> frontend/src/app/components/playlist/assistant/playlist_assistant_context.rs:4:12 |4 | pub struct PlaylistAssistantContext { | ^^^^^^^^^^^^^^^^^^^^^^^^
warning: frontend (lib) generated 2 warnings
Finished release profile [optimized] target(s) in 1m 36s
[parse exception: duplicate export name (at 0:23365)]
Fatal: error parsing wasm (try --debug for more info)
2026-09-13T23:46:01.733341Z ERROR error
error from build pipeline
Caused by: 0: HTML build pipeline failed (1 errors), showing first 1: error from asset pipeline 2: running wasm-opt 3: wasm-opt call to executable '/nix/store/irqa3dbpy5a8gv7dddn9l5ylj3wdzj4z-binaryen-132/bin/wasm-opt' with args: '["--output=/build/source/target/wasm-opt/release/frontend_bg.wasm", "-O", "/build/source/frontend/dist/.stage/frontend-a2e993a0fc94905_bg.wasm", "--all-features"]' returned a bad status: exit status: 1 2026-09-13T23:46:01.733472Z ERROR error from build pipeline</pre>
</details>nixpkgs-review result
Generated using nixpkgs-review.
Command: nixpkgs-review pr 562933
Commit: 3669eca1ee5cabedb3800c558d1676e92a638ae8
aarch64-linux
<details>
<summary>:fast_forward: 3 packages marked as broken and skipped:</summary>
<ul>
<li>redisinsight</li>
<li>rstudio</li>
<li>rstudioWrapper</li>
</ul>
</details>
<details>
<summary>:fast_forward: 1 package blacklisted:</summary>
<ul>
<li>tests.nixos-functions.nixos-test</li>
</ul>
</details>
<details>
<summary>:x: 2 packages failed to build:</summary>
<ul>
<li>quarkdown</li>
<li>tuliprox</li>
</ul>
</details>
<details>
<summary>:white_check_mark: 96 packages built:</summary>
<ul>
<li>adw-gtk3</li>
<li>ags</li>
<li>alisthelper</li>
<li>badgemagic-app</li>
<li>bazarr</li>
<li>bitfocus-companion</li>
<li>bitwarden-desktop</li>
<li>bluebubbles</li>
<li>butterfly</li>
<li>caelestia-cli</li>
<li>caelestia-shell</li>
<li>chameleonultragui</li>
<li>commet-chat</li>
<li>convertall</li>
<li>cosmic-settings-daemon</li>
<li>dart (dart-source)</li>
<li>dart-bin</li>
<li>dart-sass</li>
<li>dartHooks.dartFixupHook</li>
<li>dart_frog_cli</li>
<li>domine</li>
<li>ente-auth</li>
<li>firmware-updater</li>
<li>fladder</li>
<li>flet-client-flutter</li>
<li>flutter (flutter347, flutterPackages-bin.stable, flutterPackages-bin.v3_47, flutterPackages.stable, flutterPackages.v3_47)</li>
<li>flutter329 (flutterPackages-bin.v3_29, flutterPackages.v3_29)</li>
<li>flutter332 (flutterPackages-bin.v3_32, flutterPackages.v3_32)</li>
<li>flutter335 (flutterPackages-bin.v3_35, flutterPackages.v3_35)</li>
<li>flutter338 (flutterPackages-bin.v3_38, flutterPackages.v3_38)</li>
<li>flutter341 (flutterPackages-bin.v3_41, flutterPackages.v3_41)</li>
<li>flutter344 (flutterPackages-bin.v3_44, flutterPackages.v3_44)</li>
<li>fvm</li>
<li>gitbutler</li>
<li>gitlab</li>
<li>gitlab-ee</li>
<li>gopeed</li>
<li>homer</li>
<li>hover</li>
<li>interstellar</li>
<li>intiface-central</li>
<li>jaspr_cli</li>
<li>jekyll</li>
<li>jellyflix</li>
<li>jsonnet</li>
<li>kazumi</li>
<li>kelivo</li>
<li>libretrack</li>
<li>localsend</li>
<li>mangayomi</li>
<li>mealie</li>
<li>melos</li>
<li>mhabit</li>
<li>misskey</li>
<li>mono_repo</li>
<li>musicpod</li>
<li>n8n</li>
<li>nixpkgs-manual</li>
<li>nordvpn</li>
<li>oneanime</li>
<li>onyx</li>
<li>pana</li>
<li>peertube</li>
<li>pied</li>
<li>piliplus</li>
<li>plezy</li>
<li>protoc-gen-dart</li>
<li>proxypin</li>
<li>python313Packages.otter-grader</li>
<li>python314Packages.otter-grader</li>
<li>quarto</li>
<li>quartoMinimal</li>
<li>r2modman</li>
<li>recon</li>
<li>rstudio-server</li>
<li>rstudioServerWrapper</li>
<li>rustdesk-flutter</li>
<li>saber</li>
<li>server-box</li>
<li>serverpod_cli</li>
<li>shopware-cli</li>
<li>sideswap</li>
<li>simple-live-app</li>
<li>sly</li>
<li>tts-mod-vault</li>
<li>unsure</li>
<li>vaultwarden-webvault</li>
<li>vikunja</li>
<li>vikunja-desktop</li>
<li>voicevox</li>
<li>vscode-runner</li>
<li>webdev</li>
<li>windsend</li>
<li>wox</li>
<li>yubioath-flutter</li>
<li>zammad</li>
</ul>
</details>
<details> <summary>quarkdown</summary> <pre> at org.gradle.launcher.cli.NativeServicesInitializingAction.execute(NativeServicesInitializingAction.java:27) at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:41) at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:26) at org.gradle.launcher.cli.DefaultCommandLineActionFactory$WithLogging.execute(DefaultCommandLineActionFactory.java:483) at org.gradle.launcher.Main.doAction(Main.java:35) at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:52) at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103) at java.base/java.lang.reflect.Method.invoke(Method.java:580) at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:72) at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:39) at org.gradle.launcher.GradleMain.main(GradleMain.java:31)
> Task :quarkdown-quarkdoc-reader:compileKotlin Caching disabled for BuildToolsApiClasspathEntrySnapshotTransform: /build/tmp.Y8WeaFqhpc/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib/2.1.20/aa8ca79cd50578314f6d1180c47cbe14c0fee567/kotlin-stdlib-2.1.20.jar because: Build cache is disabled Caching disabled for BuildToolsApiClasspathEntrySnapshotTransform: /build/tmp.Y8WeaFqhpc/caches/modules-2/files-2.1/org.jetbrains/annotations/13.0/919f0dfe192fb4e063e7dacadee7f8bb9a2672a9/annotations-13.0.jar because: Build cache is disabled Caching disabled for BuildToolsApiClasspathEntrySnapshotTransform: /build/tmp.Y8WeaFqhpc/caches/modules-2/files-2.1/org.jsoup/jsoup/1.20.1/769377896610be1736f8d6d51fc52a6042d1ce82/jsoup-1.20.1.jar because: Build cache is disabled</pre>
</details> <details> <summary>tuliprox</summary> <pre> warning: struct `PlaylistAssistantContext` is never constructed --> frontend/src/app/components/playlist/assistant/playlist_assistant_context.rs:4:12 | 4 | pub struct PlaylistAssistantContext { | ^^^^^^^^^^^^^^^^^^^^^^^^warning: frontend (lib) generated 2 warnings
Finished release profile [optimized] target(s) in 3m 50s
[parse exception: duplicate export name (at 0:23522)]
Fatal: error parsing wasm (try --debug for more info)
2026-09-15T21:36:42.449478Z ERROR error
error from build pipeline
Caused by: 0: HTML build pipeline failed (1 errors), showing first 1: error from asset pipeline 2: running wasm-opt 3: wasm-opt call to executable '/nix/store/22vb0jnc8czwswa128w23diiiyx7g7cw-binaryen-132/bin/wasm-opt' with args: '["--output=/build/source/target/wasm-opt/release/frontend_bg.wasm", "-O", "/build/source/frontend/dist/.stage/frontend-74fda62b4d3fd437_bg.wasm", "--all-features"]' returned a bad status: exit status: 1 2026-09-15T21:36:42.453995Z ERROR error from build pipeline</pre>
</details>