Repository navigation
docs: document how a flake consumes a devkit project's packages - #1840
Merged
Merged
Conversation
8 tasks
gerchowl
force-pushed
the
bugfix/1826-preflight-untracked-build-output
branch
from
October 5, 2026 19:36
fd9b513 to
3aabb08
Compare
gerchowl
force-pushed
the
feature/1832-flake-package-consumers
branch
from
October 5, 2026 19:39
4555df5 to
047c6d0
Compare
gerchowl
force-pushed
the
bugfix/1826-preflight-untracked-build-output
branch
from
October 5, 2026 19:41
3aabb08 to
f23c976
Compare
gerchowl
force-pushed
the
feature/1832-flake-package-consumers
branch
from
October 5, 2026 19:41
047c6d0 to
07f13a4
Compare
gerchowl
force-pushed
the
bugfix/1826-preflight-untracked-build-output
branch
from
October 5, 2026 20:43
f23c976 to
388cadb
Compare
gerchowl
force-pushed
the
feature/1832-flake-package-consumers
branch
from
October 5, 2026 20:45
07f13a4 to
b92faa5
Compare
Base automatically changed from
bugfix/1826-preflight-untracked-build-output
to
dev
October 5, 2026 21:32
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
A flake that consumes a devkit project's
packages(e.g. one binary from a Rust CLI built bymkRustProject) inherits devkit's whole input tree in its lock: home-manager twice, git-hooks, treefmt, process-compose, services-flake and a second nixpkgs. This PR documents, and puts under test, how the consuming flake avoids that.Stack 6/6 for #1833. Base: #1839 (
bugfix/1826-preflight-untracked-build-output).Type of Change
docs-- Documentation onlytest-- Adding or updating testsChanges Made
The issue offered two remedies. I measured before choosing:
my-tool.url…b87d0…-consumer_matrix_rust-0.1.0nixpkgsfollows (the issue's dedupe stanza)follows = ""on the 7 devkit inputs packages never readdocs/MIGRATION.mdsection "Projects that ship packages to other flakes", with the full consumer stanza: build with the consumer's nixpkgs, and empty the seven unused devkit inputs with Nix'sfollows = ""idiom. That leavesnixpkgs,crane,fenixandflake-utils. The two stub flakes (assets/workspace/flake.nix,assets/flake.d/rust.flake.nix) get a comment pointing there.vigosfollow the project'snixpkgswould re-pin devkit's tools, overlay and dev shell onto a nixpkgs devkit never tested or cached. The issue's own caveat says this needs a guard. Since the consumer-side stanza fully solves the reported problem, the flip isn't needed. The rationale is in the doc section.tests/test_flake_package_consumers.py:#rusttemplate plus the seededmkRustProjectflake, withvigosoverridden to this checkout. It must build.Changelog Entry
Changed
docs/MIGRATION.mdsection "Projects that ship packages to other flakes": the consuming flake builds the package with its own nixpkgs and drops the devkit inputs a package build never reads (follows = ""), so its lock shrinks from devkit's whole input tree tonixpkgs,crane,fenixandflake-utilsflake.nixkeeps following devkit's nixpkgs, and points at the sectionTesting
crane.follows = ""to the doc block makes the build test fail withattribute 'mkLib' missing. The test catches a real dependency, not just an evaluation.tests/test_rust_scaffold.py(the managed-block lockstep across both stubs) still passes.Checklist
CHANGELOG.mdin the[Unreleased]section (and pasted the entry above)Refs: #1832, #1833