Repository navigation
Resolve each part of the nixpkgs stack from its own key, selected from the sources - #128
Merged
Merged
Conversation
…ed from the sources A nixpkgs checkout holds three parts that caisson treats as separate layers, each resolved from a key of its own with no fallback between keys: - `nixpkgs-lib`, the library, which the `nixpkgs-lib` entry composes into the lib. It no longer falls back to the `nixpkgs` key. - `nixpkgs`, the package set and its configuration. Unchanged. - `nixos`, the NixOS module collection: `nixos/modules` and `nixos/lib/eval-config.nix`. The nixos integration, and the NixOS modules system-manager reads, resolve it; they resolved `nixpkgs`. `ecosystemSrc` on a configuration is now a selection from the tree's pinned sources, a function of `sources` (`sources: sources.<name>`), as `defaultEcosystemSrc` on mkLib now is (caisson-core). A value is refused. `resolveEcosystemSrc` applies the selection, so every integration that resolves through it takes the function, and flake-parts applies it through the new `selectedEcosystemSrc`. An override replaces the part of its integration for that evaluation and nothing else: a NixOS configuration that selects another module collection runs it on the lib of the tree. Every test tree and example declares the keys of the parts it uses, with its sources pinned and selected. A new unit test checks that an `ecosystemSrc` given as a value is refused. caisson is pinned to the caisson-core branch that makes `defaultEcosystemSrc` a selection. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 21, 2026
Merged
Merged
nixpkgs reads lib.maintainers and lib.teams from its maintainers directory, beside lib/, and checks the maintainers of every derivation it creates. A composition whose library comes from the nixpkgs.lib mirror has neither file. Inside a package set, the nixpkgs integration now takes both attributes from the library of the package set's own source. The nixpkgs-lib-only integration test builds a package set on a library that holds only lib/. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
clhodapp
added a commit
to clhodapp/big-console
that referenced
this pull request
Oct 22, 2026
The root flake takes its library from the nixpkgs.lib mirror, and flake-parts follows that input. Inside a package set, caisson takes lib.maintainers and lib.teams from the nixpkgs source of that package set. The locks pin caisson to the latest commit of nix-caisson/caisson#128. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
clhodapp
added a commit
to clhodapp/ch-ai-workbench
that referenced
this pull request
Oct 22, 2026
The root flake takes its library from the nixpkgs.lib mirror, and flake-parts follows that input. Inside a package set, caisson takes lib.maintainers and lib.teams from the nixpkgs source of that package set. The locks pin caisson to the latest commit of nix-caisson/caisson#128. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
clhodapp
added a commit
to clhodapp/ch-emacs-config
that referenced
this pull request
Oct 22, 2026
The root flake takes its library from the nixpkgs.lib mirror, and flake-parts follows that input. Inside a package set, caisson takes lib.maintainers and lib.teams from the nixpkgs source of that package set. The locks pin caisson to the latest commit of nix-caisson/caisson#128. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
clhodapp
added a commit
to clhodapp/ch-zsh-config
that referenced
this pull request
Oct 22, 2026
The root flake takes its library from the nixpkgs.lib mirror, and flake-parts follows that input. Inside a package set, caisson takes lib.maintainers and lib.teams from the nixpkgs source of that package set. The locks pin caisson to the latest commit of nix-caisson/caisson#128. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
clhodapp
added a commit
to clhodapp/edk2-platforms-nix
that referenced
this pull request
Oct 22, 2026
The root flake takes its library from the nixpkgs.lib mirror, and flake-parts follows that input. Inside a package set, caisson takes lib.maintainers and lib.teams from the nixpkgs source of that package set. The locks pin caisson to the latest commit of nix-caisson/caisson#128. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
clhodapp
added a commit
to clhodapp/flake-sync
that referenced
this pull request
Oct 22, 2026
The root flake takes its library from the nixpkgs.lib mirror, and flake-parts follows that input. Inside a package set, caisson takes lib.maintainers and lib.teams from the nixpkgs source of that package set. The locks pin caisson to the latest commit of nix-caisson/caisson#128. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
clhodapp
added a commit
to clhodapp/nbd-nix
that referenced
this pull request
Oct 22, 2026
The root flake takes its library from the nixpkgs.lib mirror, and flake-parts follows that input. Inside a package set, caisson takes lib.maintainers and lib.teams from the nixpkgs source of that package set. The locks pin caisson to the latest commit of nix-caisson/caisson#128. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
clhodapp
added a commit
to clhodapp/uefi-shell-launcher
that referenced
this pull request
Oct 22, 2026
The root flake takes its library from the nixpkgs.lib mirror, and flake-parts follows that input. Inside a package set, caisson takes lib.maintainers and lib.teams from the nixpkgs source of that package set. The locks pin caisson to the latest commit of nix-caisson/caisson#128. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
clhodapp
added a commit
to clhodapp/merman-nix
that referenced
this pull request
Oct 22, 2026
The root flake takes its library from the nixpkgs.lib mirror, and flake-parts follows that input. Inside a package set, caisson takes lib.maintainers and lib.teams from the nixpkgs source of that package set. The locks pin caisson to the latest commit of nix-caisson/caisson#128. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ource Packages name the licenses and source types of the nixpkgs revision of their package set. Inside a package set, the nixpkgs integration now takes lib.licenses and lib.sourceTypes from the library of the package set's source, as it takes maintainers and teams. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…source nixpkgs' library holds general utilities and the module system, which serve every evaluation, and package-set libraries, which describe and build packages: systems and platforms, meta, licenses, sourceTypes, maintainers and teams, customisation, derivations, fetchers and versions. The packages of a set are written against the package-set libraries at the revision of the set. A package set's lib now takes those libraries from the package set's source, with the names nixpkgs publishes from them at the top level, such as getExe and callPackageWith. A name that a general library also defines stays with the general library. This replaces the four attributes taken before. The nixpkgs-lib-only test marks getExe and splitString in the composed lib and checks that the package set's lib replaces the first and keeps the second. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 24, 2026
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.
Builds on nix-caisson/caisson-core#53, merged, which makes
defaultEcosystemSrca selection. The locks pin caisson-core main at its merge commit,9e1bdf6.A nixpkgs checkout holds three parts that caisson treats as separate layers. Each is resolved from its own key, with no fallback between keys:
lib/, with the module system)nixpkgs-libnixpkgs-libentry of every libnixpkgsnixpkgs.sourcenixos/modules,nixos/lib/eval-config.nix)nixosUntil now, the
nixpkgs-libentry fell back to thenixpkgskey, and NixOS and system-manager readnixpkgs. The parts are separate so that they can come from different sources on purpose. A tree that takes them all from one checkout names it under each key.Selections.
ecosystemSrcon a configuration is now a function of the tree's pinned sources,ecosystemSrc = sources: sources.nixpkgs-stable;, asdefaultEcosystemSrcis with #53, and asdefaultPkgsalready is for package sets. A value is refused.resolveEcosystemSrcapplies the selection, so every integration that resolves through it takes the function. flake-parts reads its source directly, and applies it through the newselectedEcosystemSrc.An override replaces its integration's part for that evaluation and nothing else. A NixOS configuration that selects another module collection runs it on the tree's lib.
The package-set libraries come from the package set's source. nixpkgs' library holds general utilities and the module system, which serve every evaluation, and package-set libraries, which describe and build packages:
systemsandplatforms,meta,licenses,sourceTypes,maintainersandteams,customisation,derivations,fetchersandversions. A package set's lib now takes those libraries from the package set's source, together with the names nixpkgs publishes from them at the top level of its library, such asgetExeandcallPackageWith. A name that a general library also defines, such ascompareVersions, stays with the general library. The general utilities and the module system keep coming fromnixpkgs-lib.The packages of a set are written against the package-set libraries at the revision of the set. With this, a package set builds on a library from the nixpkgs.lib mirror, which holds only
lib/and follows nixpkgsmaster. nixpkgs readsmaintainersandteamsfrom itsmaintainersdirectory besidelib/, and checks the maintainers of every derivation it creates. ch-firmware'snixos-26.05package set failed on the 26.11 mirror before this change, onlib.licenses.gfland then onhostPlatform.linux-kernel. Its fullnix flake checkpasses on the mirror with it.The new
nixpkgs-lib-onlyintegration test builds a package set on a library that holds onlylib/. Its lib overlay marksgetExeandsplitStringin the composed lib, and the test checks that the package set's lib replaces the first and keeps the second.Breaking. Every tree must declare the keys of the parts it uses. With an input named
nixpkgs, that's:and every
ecosystemSrc = inputs.XbecomesecosystemSrc = sources: sources.X. The workspace consumers follow in PRs of their own, which pin this change.Tests. Every test tree and example declares the keys it uses, with its sources pinned and selected. A new unit test checks that an
ecosystemSrcgiven as a value is refused.nix flake checkpasses locally, including the VM tests and the evaluation-cost gate.🤖 Generated with Claude Code