Update the crane toolchain override in both nexus and agency flakes to the current function form.
What is old
crane v0.18.0 (2024-07-05) changed overrideToolchain to require a function that constructs the toolchain for a given pkgs instantiation (for correct cross-compilation splicing), instead of a bare toolchain derivation.
Both repos still use the old bare-derivation form:
# nexus/flake.nix and agency/flake.nix
craneLib = (crane.mkLib pkgs).overrideToolchain
(fenix.packages.${system}.complete.toolchain);
It still evaluates today, but is the deprecated form per crane's docs.
What to do
Switch to the function form, e.g.:
craneLib = (crane.mkLib pkgs).overrideToolchain
(p: fenix.packages.${p.stdenv.hostPlatform.system}.complete.toolchain);
# or, if not cross-compiling, simply: (_: fenix.packages.${system}.complete.toolchain)
Apply to:
While in there (quick audit, likely no-ops)
Recent crane breaking changes — confirm none apply:
- v0.23.0:
remapPathPrefixHook now opt-in via doRemapPathPrefix
- v0.23.3:
mkCargoDerivation no longer overrides stdenv via attrs (use craneLib-level stdenvSelector)
Context
Discovered while standing up bombay's Nix flake (which was modeled on nexus/agency and already uses the function form). Refs: crane API https://crane.dev/API.html, CHANGELOG https://crane.dev/CHANGELOG.html.
Update the crane toolchain override in both nexus and agency flakes to the current function form.
What is old
crane v0.18.0 (2024-07-05) changed
overrideToolchainto require a function that constructs the toolchain for a givenpkgsinstantiation (for correct cross-compilation splicing), instead of a bare toolchain derivation.Both repos still use the old bare-derivation form:
It still evaluates today, but is the deprecated form per crane's docs.
What to do
Switch to the function form, e.g.:
Apply to:
nexus/flake.nixagency/flake.nixWhile in there (quick audit, likely no-ops)
Recent crane breaking changes — confirm none apply:
remapPathPrefixHooknow opt-in viadoRemapPathPrefixmkCargoDerivationno longer overridesstdenvvia attrs (usecraneLib-levelstdenvSelector)Context
Discovered while standing up bombay's Nix flake (which was modeled on nexus/agency and already uses the function form). Refs: crane API https://crane.dev/API.html, CHANGELOG https://crane.dev/CHANGELOG.html.