From 0fa8d7e84ba4dab31f5798562d3cf726989176da Mon Sep 17 00:00:00 2001 From: Chris Hodapp Date: Wed, 21 Oct 2026 00:27:09 -0700 Subject: [PATCH 1/5] feat: resolve each part of the nixpkgs stack from its own key, selected 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.`), 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 --- configs/flake/caisson/partitions/checks.nix | 3 +- examples/literate-flake/flake.nix | 5 + flake.lock | 6 +- lib-overlays/flake-parts/default.nix | 9 +- lib-overlays/integrations/default.nix | 31 +++- lib-overlays/nixos/default.nix | 7 +- lib-overlays/nixpkgs-lib/default.nix | 26 +-- lib-overlays/system-manager/default.nix | 7 +- tests/activation-vm/default.nix | 11 +- tests/darwin-system/default.nix | 8 +- tests/dependencies/flake.lock | 6 +- tests/drift-message/default.nix | 2 +- tests/hjem-system/default.nix | 20 ++- tests/integration/basic-composition/flake.nix | 1 + .../final-consumer/flake.nix | 1 + .../lib-consumer-chain/middle-flake/flake.nix | 1 + tests/integration/minimal-consumer/flake.nix | 1 + .../integration/module-class-export/flake.nix | 1 + tests/integration/nixpkgs-consumer/flake.nix | 1 + .../integration/nixpkgs-no-pkg-sets/flake.nix | 1 + .../nixpkgs-overlay-export/flake.nix | 1 + tests/integration/nixpkgs-pkg-sets/flake.nix | 4 +- .../pkg-overlays-registry/consumer/flake.nix | 1 + .../pkg-overlays-registry/producer/flake.nix | 1 + tests/pinned-world/default.nix | 163 ++++++++++-------- tests/system-manager/sequence.nix | 11 +- tests/unit/flake.nix | 1 - tests/unit/lib-overlays.nix | 120 ++++++++----- 28 files changed, 285 insertions(+), 165 deletions(-) diff --git a/configs/flake/caisson/partitions/checks.nix b/configs/flake/caisson/partitions/checks.nix index b42450ad..10cbbdf4 100644 --- a/configs/flake/caisson/partitions/checks.nix +++ b/configs/flake/caisson/partitions/checks.nix @@ -139,8 +139,7 @@ core = import ${inputs.caisson-core.outPath}; in core.mkLib { - sources = { }; - defaultEcosystemSrc.nixpkgs-lib = ${inputs.nixpkgs-lib.outPath}; + sources.nixpkgs-lib = ${inputs.nixpkgs-lib.outPath}; modules = lib: lib.caisson-core.mkModules ${self.outPath}/modules; libOverlays = lib: lib.caisson-core.mkLibOverlays ${self.outPath}/lib-overlays; } diff --git a/examples/literate-flake/flake.nix b/examples/literate-flake/flake.nix index a9e657f9..db50f3e1 100644 --- a/examples/literate-flake/flake.nix +++ b/examples/literate-flake/flake.nix @@ -79,6 +79,11 @@ # composition closes over, and the root from `self`. inherit (caisson.lib.caisson.pins.flake inputs) sources root; + # The library the composition runs on: the `lib` of the + # nixpkgs input, selected under the `nixpkgs-lib` key since + # this flake names no separate nixpkgs.lib mirror. + defaultEcosystemSrc = sources: { nixpkgs-lib = sources.nixpkgs; }; + # The project's name, which this flake holds and which is the # namespace it contributes to the composed library: the `lib` # flake output holds `lib.literate-flake` because of this diff --git a/flake.lock b/flake.lock index d4c181ed..a8eadd30 100644 --- a/flake.lock +++ b/flake.lock @@ -2,11 +2,11 @@ "nodes": { "caisson-core": { "locked": { - "lastModified": 1792556427, - "narHash": "sha256-9XWV/rnEM90spykkF7cDcqXsyrvwB4MO6wa8gTEi+Ig=", + "lastModified": 1792565916, + "narHash": "sha256-5SMkHLn3uyGkzCl6/VAxLoZ08fRlq9lrhD0JbuO8eUI=", "owner": "nix-caisson", "repo": "caisson-core", - "rev": "502690fce026a3c009f254e38b47e7e95527ca4a", + "rev": "84e25f84c40edd62324f508c5f5db4bbf0b8b883", "type": "github" }, "original": { diff --git a/lib-overlays/flake-parts/default.nix b/lib-overlays/flake-parts/default.nix index 990d408e..f598742d 100644 --- a/lib-overlays/flake-parts/default.nix +++ b/lib-overlays/flake-parts/default.nix @@ -85,8 +85,13 @@ let selection = lib.caisson.integrations; - flakeParts = - if (args.ecosystemSrc or null) == null then flakePartsDefault else flakePartsFor args.ecosystemSrc; + # The flake-parts source the configuration selects from the + # tree's sources, null when it selects none. + selected = + selection.selectedEcosystemSrc "lib.caisson.flake-parts.mkConfiguration" + (lib.caisson-core.libManifest or { }) + (args.ecosystemSrc or null); + flakeParts = if selected == null then flakePartsDefault else flakePartsFor selected; # The flake class of the registry, the same source every # adapter selects from, so modules arriving by any channel diff --git a/lib-overlays/integrations/default.nix b/lib-overlays/integrations/default.nix index ddc32090..f5274b8c 100644 --- a/lib-overlays/integrations/default.nix +++ b/lib-overlays/integrations/default.nix @@ -104,6 +104,25 @@ inherit (final.caisson-core.strings) hasInfix; inherit (final.caisson-core.functions) functionArgs setFunctionArgs; + # The source a configuration's `ecosystemSrc` selects: the + # argument is a function of the tree's pinned sources, as + # `defaultEcosystemSrc` on mkLib is, so a configuration chooses + # among the sources the tree pins. Null when the configuration + # passes none. `manifest` is the manifest whose `sources` it + # selects from, the lib manifest of the evaluation. + selectedEcosystemSrc = + context: manifest: explicit: + if explicit == null then + null + else if builtins.isFunction explicit then + explicit (manifest.sources or { }) + else + throw '' + ${context}: `ecosystemSrc` is a function of the tree's sources that + returns the source to use, `ecosystemSrc = sources: sources.;`, + but got a ${builtins.typeOf explicit}. + ''; + resolveEcosystemSrc = { # the integration's name for its ecosystem, e.g. "nixpkgs" @@ -117,7 +136,8 @@ }: let resolved = final.caisson-core.resolve { - inherit name explicit; + inherit name; + explicit = selectedEcosystemSrc context manifest explicit; defaults = manifest.defaultEcosystemSrc or { }; sources = manifest.sources or { }; }; @@ -126,9 +146,11 @@ resolved else throw '' - ${context}: no ${name} ecosystem source. Pass `ecosystemSrc` - explicitly, declare `defaultEcosystemSrc.${name}` in the mkLib call, - or pin a source named `${name}` in the `sources` passed to mkLib. + ${context}: no ${name} ecosystem source. Select one with + `ecosystemSrc = sources: sources.;` on the configuration, + return a `${name}` from the `defaultEcosystemSrc` function of the + mkLib call, or pin a source named `${name}` in the `sources` passed + to mkLib. ''; named = @@ -1630,6 +1652,7 @@ publish topValue resolveEcosystemSrc + selectedEcosystemSrc mkIntegration mkAltIntegration frameworkModules diff --git a/lib-overlays/nixos/default.nix b/lib-overlays/nixos/default.nix index 464d3812..c9bbf3dd 100644 --- a/lib-overlays/nixos/default.nix +++ b/lib-overlays/nixos/default.nix @@ -24,8 +24,13 @@ overlay = final: prev: let + # The source of the NixOS module collection: `nixos/modules` and + # `nixos/lib/eval-config.nix`, of the composition's `nixos` key. + # The library the modules run on is the composed lib, from the + # `nixpkgs-lib` key, and the package set is a package config, + # from the `nixpkgs` key: three parts, each from a separate key. resolveEcosystemSrc = final.caisson.integrations.resolveEcosystemSrc { - name = "nixpkgs"; + name = "nixos"; context = "caisson.nixos"; }; diff --git a/lib-overlays/nixpkgs-lib/default.nix b/lib-overlays/nixpkgs-lib/default.nix index cadff9f5..611f3230 100644 --- a/lib-overlays/nixpkgs-lib/default.nix +++ b/lib-overlays/nixpkgs-lib/default.nix @@ -10,13 +10,15 @@ # merges that source's `lib` into the composed library, as the source # fixes it. # -# The source is the one the composition supplies for the ecosystem -# `nixpkgs-lib` (the library part declared separately: the nixpkgs.lib -# mirror, or nixpkgs' `lib` directory), else the one it supplies for -# the ecosystem `nixpkgs` (a nixpkgs checkout, one pin supplying every -# part). What a composition supplies for an ecosystem is its -# `defaultEcosystemSrc.`, else the source it pins under that -# exact name. +# The source is the source the composition supplies for the part +# `nixpkgs-lib`: the nixpkgs.lib mirror, a tree holding nixpkgs' `lib` +# directory such as a nixpkgs checkout, or that directory. The library +# is a part of the nixpkgs stack separate from the package set and from +# the NixOS module collection, each supplied from a separate key, so a +# tree that takes the library from its nixpkgs checkout names that +# checkout under `nixpkgs-lib` as well. What a composition supplies for +# a part is its `defaultEcosystemSrc.`, else the source it pins +# under that exact name. # # The source is read from `prev.caisson-core.ecosystemSrc`, which # caisson-core publishes in the first layers of a library from the @@ -52,15 +54,15 @@ # Null for every name in a library that caisson-core's entries # are not part of. supplied = (prev.caisson-core or { }).ecosystemSrc or (_name: null); - src = if supplied "nixpkgs-lib" != null then supplied "nixpkgs-lib" else supplied "nixpkgs"; + src = supplied "nixpkgs-lib"; root = if src == null then builtins.throw '' caisson: the `nixpkgs-lib` entry has no source. Declare - `defaultEcosystemSrc.nixpkgs-lib` (the nixpkgs.lib mirror, or nixpkgs' - `lib` directory) or `defaultEcosystemSrc.nixpkgs` (a nixpkgs checkout) - in the mkLib call, or pin a source named exactly `nixpkgs-lib` or - `nixpkgs` in the `sources` passed to mkLib. + `defaultEcosystemSrc.nixpkgs-lib` in the mkLib call (the nixpkgs.lib + mirror, or a nixpkgs checkout: `defaultEcosystemSrc.nixpkgs-lib = + inputs.nixpkgs;`), or pin a source named exactly `nixpkgs-lib` in the + `sources` passed to mkLib. '' else "${src}"; diff --git a/lib-overlays/system-manager/default.nix b/lib-overlays/system-manager/default.nix index 3dee39ae..98354c9a 100644 --- a/lib-overlays/system-manager/default.nix +++ b/lib-overlays/system-manager/default.nix @@ -58,10 +58,11 @@ context = "caisson.system-manager"; }; - # The nixpkgs the evaluation runs on: the one the composition - # declares, as for a NixOS configuration. + # The source of the NixOS module collection the evaluation reads + # modules from: the composition's `nixos` key, as for a NixOS + # configuration. resolveNixpkgsSrc = final.caisson.integrations.resolveEcosystemSrc { - name = "nixpkgs"; + name = "nixos"; context = "caisson.system-manager"; }; diff --git a/tests/activation-vm/default.nix b/tests/activation-vm/default.nix index 8d01f92e..293a4b4f 100644 --- a/tests/activation-vm/default.nix +++ b/tests/activation-vm/default.nix @@ -58,10 +58,7 @@ let pkgs = import inputs.nixpkgs { inherit system; }; lib = core.mkLib { - sources = { }; - systems = [ system ]; - projects.caisson = inputs.caisson; - defaultEcosystemSrc = { + sources = { inherit (inputs) nixpkgs nvf @@ -70,6 +67,12 @@ let home-manager ; }; + systems = [ system ]; + projects.caisson = inputs.caisson; + defaultEcosystemSrc = sources: { + nixpkgs-lib = sources.nixpkgs; + nixos = sources.nixpkgs; + }; pkgSets = _lib: { default = { name, parent }: diff --git a/tests/darwin-system/default.nix b/tests/darwin-system/default.nix index 06ece0a9..d6a2e960 100644 --- a/tests/darwin-system/default.nix +++ b/tests/darwin-system/default.nix @@ -23,10 +23,7 @@ let pkgs = import inputs.nixpkgs { inherit system; }; lib = core.mkLib { - sources = { }; - systems = [ system ]; - projects.caisson = inputs.caisson; - defaultEcosystemSrc = { + sources = { inherit (inputs) nixpkgs nix-darwin @@ -35,6 +32,9 @@ let nvf ; }; + systems = [ system ]; + projects.caisson = inputs.caisson; + defaultEcosystemSrc = sources: { nixpkgs-lib = sources.nixpkgs; }; pkgSets = _lib: { default = { name, parent }: diff --git a/tests/dependencies/flake.lock b/tests/dependencies/flake.lock index 16dd7590..3682a7ac 100644 --- a/tests/dependencies/flake.lock +++ b/tests/dependencies/flake.lock @@ -2,11 +2,11 @@ "nodes": { "caisson-core": { "locked": { - "lastModified": 1792556427, - "narHash": "sha256-9XWV/rnEM90spykkF7cDcqXsyrvwB4MO6wa8gTEi+Ig=", + "lastModified": 1792565916, + "narHash": "sha256-5SMkHLn3uyGkzCl6/VAxLoZ08fRlq9lrhD0JbuO8eUI=", "owner": "nix-caisson", "repo": "caisson-core", - "rev": "502690fce026a3c009f254e38b47e7e95527ca4a", + "rev": "84e25f84c40edd62324f508c5f5db4bbf0b8b883", "type": "github" }, "original": { diff --git a/tests/drift-message/default.nix b/tests/drift-message/default.nix index 9b9ec8d6..31726749 100644 --- a/tests/drift-message/default.nix +++ b/tests/drift-message/default.nix @@ -24,7 +24,7 @@ let user = "probe"; directory = "/home/probe"; caisson.nvf.configurations.editor = lib.caisson.nvf.mkConfiguration { - ecosystemSrc = inputs.nvf; + ecosystemSrc = sources: sources.nvf; configModule.vim.viAlias = true; }; }; diff --git a/tests/hjem-system/default.nix b/tests/hjem-system/default.nix index fb5adcfb..aef57aa0 100644 --- a/tests/hjem-system/default.nix +++ b/tests/hjem-system/default.nix @@ -6,8 +6,10 @@ # tree itself. # # The composition is for x86_64-linux, with a package config whose set -# there is nixpkgs, and with nixpkgs and hjem declared as its -# ecosystems. `user` is a hjem module with a file and a package. +# there is nixpkgs, and with nixpkgs, hjem, the library and the NixOS +# module collection declared as its ecosystems, the library and the +# module collection from the same nixpkgs pin. `user` is a hjem module +# with a file and a package. # `standalone` is a hjem configuration that is a top, for the user # `probe` with the home directory it sets itself. `top` is a structural # top holding a NixOS machine `probe-machine`, which declares the @@ -22,11 +24,19 @@ let pkgs = import inputs.nixpkgs { inherit system; }; lib = core.mkLib { - sources = { }; + sources = { + inherit (inputs) + nixpkgs + hjem + nvf + home-manager + ; + }; systems = [ system ]; projects.caisson = inputs.caisson; - defaultEcosystemSrc = { - inherit (inputs) nixpkgs hjem; + defaultEcosystemSrc = sources: { + nixpkgs-lib = sources.nixpkgs; + nixos = sources.nixpkgs; }; pkgSets = _lib: { default = diff --git a/tests/integration/basic-composition/flake.nix b/tests/integration/basic-composition/flake.nix index ec5b5942..b5aa2d88 100644 --- a/tests/integration/basic-composition/flake.nix +++ b/tests/integration/basic-composition/flake.nix @@ -29,6 +29,7 @@ # namespaces of the composed library (`caisson`, `caisson-core`). lib = parent.lib.caisson.mkLib { inherit (parent.lib.caisson.pins.flake inputs) sources root; + defaultEcosystemSrc = sources: { nixpkgs-lib = sources.nixpkgs; }; projects = { caisson = parent; }; diff --git a/tests/integration/lib-consumer-chain/final-consumer/flake.nix b/tests/integration/lib-consumer-chain/final-consumer/flake.nix index 9c58763c..943e9452 100644 --- a/tests/integration/lib-consumer-chain/final-consumer/flake.nix +++ b/tests/integration/lib-consumer-chain/final-consumer/flake.nix @@ -21,6 +21,7 @@ let lib = parent.lib.caisson.mkLib { inherit (parent.lib.caisson.pins.flake inputs) sources root; + defaultEcosystemSrc = sources: { nixpkgs-lib = sources.nixpkgs; }; name = "final-consumer"; projects = { caisson = parent; diff --git a/tests/integration/lib-consumer-chain/middle-flake/flake.nix b/tests/integration/lib-consumer-chain/middle-flake/flake.nix index 78894032..83c9c623 100644 --- a/tests/integration/lib-consumer-chain/middle-flake/flake.nix +++ b/tests/integration/lib-consumer-chain/middle-flake/flake.nix @@ -16,6 +16,7 @@ let lib = parent.lib.caisson.mkLib { inherit (parent.lib.caisson.pins.flake inputs) sources root; + defaultEcosystemSrc = sources: { nixpkgs-lib = sources.nixpkgs; }; # The name this flake holds, deliberately not the directory # name: the final consumer lists this flake in `projects` under diff --git a/tests/integration/minimal-consumer/flake.nix b/tests/integration/minimal-consumer/flake.nix index fb681bca..2c2ee5eb 100644 --- a/tests/integration/minimal-consumer/flake.nix +++ b/tests/integration/minimal-consumer/flake.nix @@ -24,6 +24,7 @@ # registers one lib overlay and no modules. lib = parent.lib.caisson.mkLib { inherit (parent.lib.caisson.pins.flake inputs) sources root; + defaultEcosystemSrc = sources: { nixpkgs-lib = sources.nixpkgs; }; projects = { caisson = parent; diff --git a/tests/integration/module-class-export/flake.nix b/tests/integration/module-class-export/flake.nix index 4cd7173d..c62b00cf 100644 --- a/tests/integration/module-class-export/flake.nix +++ b/tests/integration/module-class-export/flake.nix @@ -16,6 +16,7 @@ let lib = parent.lib.caisson.mkLib { inherit (parent.lib.caisson.pins.flake inputs) sources root; + defaultEcosystemSrc = sources: { nixpkgs-lib = sources.nixpkgs; }; projects = { caisson = parent; diff --git a/tests/integration/nixpkgs-consumer/flake.nix b/tests/integration/nixpkgs-consumer/flake.nix index aa89e864..465aa91e 100644 --- a/tests/integration/nixpkgs-consumer/flake.nix +++ b/tests/integration/nixpkgs-consumer/flake.nix @@ -25,6 +25,7 @@ # `pkgs.nixpkgs-consumer` because of this declaration. name = "nixpkgs-consumer"; systems = [ "x86_64-linux" ]; + defaultEcosystemSrc = sources: { nixpkgs-lib = sources.nixpkgs; }; projects = { caisson = parent; }; diff --git a/tests/integration/nixpkgs-no-pkg-sets/flake.nix b/tests/integration/nixpkgs-no-pkg-sets/flake.nix index 1099e97d..fe58208f 100644 --- a/tests/integration/nixpkgs-no-pkg-sets/flake.nix +++ b/tests/integration/nixpkgs-no-pkg-sets/flake.nix @@ -21,6 +21,7 @@ let lib = parent.lib.caisson.mkLib { inherit (parent.lib.caisson.pins.flake inputs) sources root; + defaultEcosystemSrc = sources: { nixpkgs-lib = sources.nixpkgs; }; projects = { caisson = parent; }; diff --git a/tests/integration/nixpkgs-overlay-export/flake.nix b/tests/integration/nixpkgs-overlay-export/flake.nix index 0dc791f0..2019b21a 100644 --- a/tests/integration/nixpkgs-overlay-export/flake.nix +++ b/tests/integration/nixpkgs-overlay-export/flake.nix @@ -23,6 +23,7 @@ inherit (parent.lib.caisson.pins.flake inputs) sources root; name = "nixpkgs-overlay-export"; systems = [ "x86_64-linux" ]; + defaultEcosystemSrc = sources: { nixpkgs-lib = sources.nixpkgs; }; projects = { caisson = parent; }; diff --git a/tests/integration/nixpkgs-pkg-sets/flake.nix b/tests/integration/nixpkgs-pkg-sets/flake.nix index 8538b05b..0d213fc5 100644 --- a/tests/integration/nixpkgs-pkg-sets/flake.nix +++ b/tests/integration/nixpkgs-pkg-sets/flake.nix @@ -22,9 +22,7 @@ projects = { caisson = parent; }; - defaultEcosystemSrc = { - inherit (inputs) nixpkgs; - }; + defaultEcosystemSrc = sources: { nixpkgs-lib = sources.nixpkgs; }; modules = lib: lib.caisson.mkModules ./modules; pkgOverlays = lib: lib.caisson.mkPkgOverlays ./pkg-overlays; # The package configs: `default` takes the default selections, diff --git a/tests/integration/pkg-overlays-registry/consumer/flake.nix b/tests/integration/pkg-overlays-registry/consumer/flake.nix index bc911f82..b1d06cdf 100644 --- a/tests/integration/pkg-overlays-registry/consumer/flake.nix +++ b/tests/integration/pkg-overlays-registry/consumer/flake.nix @@ -20,6 +20,7 @@ inherit (core.pins.flake inputs) sources root; name = "consumer"; systems = [ "x86_64-linux" ]; + defaultEcosystemSrc = sources: { nixpkgs-lib = sources.nixpkgs; }; projects = { caisson = parent; inherit producer; diff --git a/tests/integration/pkg-overlays-registry/producer/flake.nix b/tests/integration/pkg-overlays-registry/producer/flake.nix index a4f8a0cf..348d16ef 100644 --- a/tests/integration/pkg-overlays-registry/producer/flake.nix +++ b/tests/integration/pkg-overlays-registry/producer/flake.nix @@ -19,6 +19,7 @@ inherit (core.pins.flake inputs) sources root; name = "producer"; systems = [ "x86_64-linux" ]; + defaultEcosystemSrc = sources: { nixpkgs-lib = sources.nixpkgs; }; projects = { caisson = parent; }; diff --git a/tests/pinned-world/default.nix b/tests/pinned-world/default.nix index aa5538ab..55c75f8c 100644 --- a/tests/pinned-world/default.nix +++ b/tests/pinned-world/default.nix @@ -38,8 +38,7 @@ let # last occurrence of a key supplies its value. registered = (core.mkLib { - sources = { }; - defaultEcosystemSrc.nixpkgs-lib = inputs.nixpkgs-lib; + sources = { inherit (inputs) nixpkgs-lib; }; projects.caisson = inputs.caisson; }).caisson-core.libManifest.libOverlays; @@ -202,23 +201,38 @@ let # The colmena and disko probes compose with declared ecosystems: a # node resolves the colmena source, a layout resolves the disko - # source, and nixpkgs resolves from the declaration, as it does in a - # consumer flake. + # source, and the package set, the library and the NixOS module + # collection resolve from the declaration, as they do in a consumer + # flake. The library and the NixOS module collection are the same + # nixpkgs pin as the package set. hiveLib = core.mkLib ( declaresPkgs // { - sources = { }; - projects = { - caisson = inputs.caisson; - }; - defaultEcosystemSrc = { + sources = { inherit (inputs) nixpkgs colmena flake-parts disko + home-manager + nvf + treefmt-nix + nixvim + nix-topology + kubenix + nixidy + system-manager + hjem + terranix ; }; + projects = { + caisson = inputs.caisson; + }; + defaultEcosystemSrc = sources: { + nixpkgs-lib = sources.nixpkgs; + nixos = sources.nixpkgs; + }; } ); @@ -379,14 +393,14 @@ let { lib, ... }: { caisson.nixos.configurations.probe = lib.caisson.nixos.mkConfiguration { - ecosystemSrc = inputs.nixpkgs; + ecosystemSrc = sources: sources.nixpkgs; configModule = { lib, ... }: let home = module: lib.caisson.home-manager.mkConfiguration { - ecosystemSrc = inputs.home-manager; + ecosystemSrc = sources: sources.home-manager; configModule = { imports = [ module ]; home.stateVersion = "25.05"; @@ -419,7 +433,7 @@ let # of the evaluation hands the library out through an option. nixosEvaluationLib = (hiveLib.caisson.nixos.mkTopConfiguration { - ecosystemSrc = inputs.nixpkgs; + ecosystemSrc = sources: sources.nixpkgs; configModule = { lib, ... }: { @@ -614,7 +628,7 @@ let minimalNixosSystemEvaluates = let system = hiveLib.caisson.nixos-minimal.mkTopConfiguration { - ecosystemSrc = inputs.nixpkgs; + ecosystemSrc = sources: sources.nixpkgs; # The minimal evaluator carries no nixpkgs module, so the # package set arrives as the `pkgs` module argument. configModule = @@ -638,20 +652,20 @@ let { lib, ... }: { caisson.caisson-colmena.configurations.default = lib.caisson.caisson-colmena.mkConfiguration { - ecosystemSrc = { }; + ecosystemSrc = sources: { }; }; }; }).colmenaHive && throws (hiveLib.caisson.terranix.mkTopConfiguration { - ecosystemSrc = { }; + ecosystemSrc = sources: { }; configModule = { }; }).drvPath && throws (hiveLib.caisson.system-manager.mkTopConfiguration { - ecosystemSrc = { }; + ecosystemSrc = sources: { }; configModule = { }; }).drvPath; @@ -662,7 +676,7 @@ let # home-manager CLI reads it: the evaluated home-manager # configuration. home = hiveLib.caisson.home-manager.mkTopConfiguration { - ecosystemSrc = inputs.home-manager; + ecosystemSrc = sources: sources.home-manager; configModule = { ... }: { @@ -883,7 +897,7 @@ let machine = lib: lib.caisson.nixos.mkConfiguration { - ecosystemSrc = inputs.nixpkgs; + ecosystemSrc = sources: sources.nixpkgs; configModule = minimalNixosBase; }; top = hiveLib.caisson.structural.mkTopConfiguration { @@ -1009,7 +1023,7 @@ let aMachineInsideAParentIsTheSameMachine = let machine = { - ecosystemSrc = inputs.nixpkgs; + ecosystemSrc = sources: sources.nixpkgs; configModule = { imports = [ minimalNixosBase ]; networking.hostName = "probe"; @@ -1046,7 +1060,7 @@ let { lib, ... }: { caisson.nixos.configurations.probe = lib.caisson.nixos.mkConfiguration { - ecosystemSrc = inputs.nixpkgs; + ecosystemSrc = sources: sources.nixpkgs; configModule = minimalNixosBase; }; }; @@ -1093,7 +1107,7 @@ let aHomeInsideAParentIsTheSameHome = let home = { - ecosystemSrc = inputs.home-manager; + ecosystemSrc = sources: sources.home-manager; configModule = { home.username = "probe"; home.homeDirectory = "/home/probe"; @@ -1117,7 +1131,7 @@ let { lib, ... }: { caisson.nixos.configurations.host = lib.caisson.nixos.mkConfiguration { - ecosystemSrc = inputs.nixpkgs; + ecosystemSrc = sources: sources.nixpkgs; configModule = { lib, ... }: { @@ -1219,7 +1233,7 @@ let top = colmenaTop { probe = hostModule; }; node = top.colmenaHive.nodes.probe; system = hiveLib.caisson.nixos.mkTopConfiguration { - ecosystemSrc = inputs.nixpkgs; + ecosystemSrc = sources: sources.nixpkgs; configModule = hostModule; }; in @@ -1292,11 +1306,12 @@ let "aarch64-linux" ]; twoSystemsLib = core.mkLib { - sources = { }; + sources = { inherit (inputs) nixpkgs colmena; }; inherit systems; projects.caisson = inputs.caisson; - defaultEcosystemSrc = { - inherit (inputs) nixpkgs colmena; + defaultEcosystemSrc = sources: { + nixpkgs-lib = sources.nixpkgs; + nixos = sources.nixpkgs; }; pkgSets = _lib: { default = @@ -1366,7 +1381,7 @@ let { lib, ... }: { caisson.caisson-colmena.configurations.default = lib.caisson.caisson-colmena.mkConfiguration { - inherit ecosystemSrc; + ecosystemSrc = _sources: ecosystemSrc; configModule = { lib, ... }: { @@ -2177,7 +2192,7 @@ let nvfConfiguration = lib: module: lib.caisson.nvf.mkConfiguration { - ecosystemSrc = inputs.nvf; + ecosystemSrc = sources: sources.nvf; configModule = module; }; top = probe.lib.caisson.structural.mkTopConfiguration { @@ -2269,7 +2284,7 @@ let { lib, ... }: { caisson.nvf.configurations.editor = lib.caisson.nvf.mkConfiguration { - ecosystemSrc = inputs.nvf; + ecosystemSrc = sources: sources.nvf; configModule.vim.viAlias = true; }; }; @@ -2511,11 +2526,11 @@ let { lib, ... }: { caisson.treefmt.configurations.default = lib.caisson.treefmt.mkConfiguration { - ecosystemSrc = inputs.treefmt-nix; + ecosystemSrc = sources: sources.treefmt-nix; configModule = module; }; caisson.treefmt.configurations.docs = lib.caisson.treefmt.mkConfiguration { - ecosystemSrc = inputs.treefmt-nix; + ecosystemSrc = sources: sources.treefmt-nix; configModule = { projectRootFile = "book.toml"; programs.nixfmt.enable = true; @@ -2532,12 +2547,10 @@ let rootedLib = core.mkLib ( declaresPkgs // { - sources = { }; + sources = { inherit (inputs) nixpkgs treefmt-nix; }; inherit root; projects.caisson = inputs.caisson; - defaultEcosystemSrc = { - inherit (inputs) nixpkgs; - }; + defaultEcosystemSrc = sources: { nixpkgs-lib = sources.nixpkgs; }; } ); rooted = rootedLib.caisson.structural.mkTopConfiguration { @@ -2579,7 +2592,7 @@ let nvfConfiguration = lib: lib.caisson.nvf.mkConfiguration { - ecosystemSrc = inputs.nvf; + ecosystemSrc = sources: sources.nvf; configModule = module; }; top = hiveLib.caisson.structural.mkTopConfiguration { @@ -2602,7 +2615,7 @@ let }; }; caisson.home-manager.configurations.alice = lib.caisson.home-manager.mkConfiguration { - ecosystemSrc = inputs.home-manager; + ecosystemSrc = sources: sources.home-manager; configModule = { lib, ... }: { @@ -2671,7 +2684,7 @@ let { lib, ... }: { caisson.nixvim.configurations.editor = lib.caisson.nixvim.mkConfiguration { - ecosystemSrc = inputs.nixvim; + ecosystemSrc = sources: sources.nixvim; configModule = module; }; }; @@ -2710,7 +2723,7 @@ let { imports = [ minimalNixosBase ]; caisson.nixvim.configurations.machine-editor = lib.caisson.nixvim.mkConfiguration { - ecosystemSrc = inputs.nixvim; + ecosystemSrc = sources: sources.nixvim; configModule = module; }; }; @@ -2762,7 +2775,7 @@ let { lib, ... }: { caisson.topology.configurations.default = lib.caisson.topology.mkConfiguration { - ecosystemSrc = inputs.nix-topology; + ecosystemSrc = sources: sources.nix-topology; configModule = { lib, ... }: { @@ -2825,7 +2838,7 @@ let { lib, ... }: { caisson.kubenix.configurations.cluster = lib.caisson.kubenix.mkConfiguration { - ecosystemSrc = inputs.kubenix; + ecosystemSrc = sources: sources.kubenix; configModule = module; }; }; @@ -2855,7 +2868,7 @@ let { lib, ... }: { caisson.nixidy.configurations.prod = lib.caisson.nixidy.mkConfiguration { - ecosystemSrc = inputs.nixidy; + ecosystemSrc = sources: sources.nixidy; configModule = module; }; }; @@ -2883,7 +2896,7 @@ let editor = lib: lib.caisson.nvf.mkConfiguration { - ecosystemSrc = inputs.nvf; + ecosystemSrc = sources: sources.nvf; configModule.vim.viAlias = true; }; withEditor = @@ -2912,7 +2925,7 @@ let bob = lib.caisson.hjem.mkConfiguration { configModule = withEditor "bob-editor"; }; }; caisson.home-manager.configurations.carol = lib.caisson.home-manager.mkConfiguration { - ecosystemSrc = inputs.home-manager; + ecosystemSrc = sources: sources.home-manager; configModule = { imports = [ (withEditor "carol-editor") ]; home.stateVersion = "25.05"; @@ -2950,7 +2963,7 @@ let { lib, ... }: { caisson.system-manager.configurations.box = lib.caisson.system-manager.mkConfiguration { - ecosystemSrc = inputs.system-manager; + ecosystemSrc = sources: sources.system-manager; configModule = { lib, ... }: { @@ -2963,24 +2976,24 @@ let home = "/home/probe"; }; caisson.home-manager.configurations.probe = lib.caisson.home-manager.mkConfiguration { - ecosystemSrc = inputs.home-manager; + ecosystemSrc = sources: sources.home-manager; configModule.home.stateVersion = "25.05"; }; caisson.hjem.configurations.probe = lib.caisson.hjem.mkConfiguration { - ecosystemSrc = inputs.hjem; + ecosystemSrc = sources: sources.hjem; configModule = { lib, pkgs, ... }: { files.".config/probe/greeting".text = "hello"; packages = [ pkgs.hello ]; caisson.nvf.configurations.hjem-editor = lib.caisson.nvf.mkConfiguration { - ecosystemSrc = inputs.nvf; + ecosystemSrc = sources: sources.nvf; configModule.vim.vimAlias = true; }; }; }; caisson.nvf.configurations.editor = lib.caisson.nvf.mkConfiguration { - ecosystemSrc = inputs.nvf; + ecosystemSrc = sources: sources.nvf; configModule.vim.viAlias = true; }; }; @@ -3040,7 +3053,7 @@ let config.output.composed.value = lib ? caisson-core; }; terraform = hiveLib.caisson.terranix.mkTopConfiguration { - ecosystemSrc = inputs.terranix; + ecosystemSrc = sources: sources.terranix; configModule = module; }; published = hiveLib.caisson.structural.mkTopConfiguration { @@ -3049,7 +3062,7 @@ let { lib, ... }: { caisson.terranix.configurations.infra = lib.caisson.terranix.mkConfiguration { - ecosystemSrc = inputs.terranix; + ecosystemSrc = sources: sources.terranix; configModule = module; }; }; @@ -3078,11 +3091,11 @@ let config.environment.etc.composed.text = builtins.toJSON (lib ? caisson-core); }; system = hiveLib.caisson.system-manager.mkTopConfiguration { - ecosystemSrc = inputs.system-manager; + ecosystemSrc = sources: sources.system-manager; configModule = module; }; withOverlay = hiveLib.caisson.system-manager.mkTopConfiguration { - ecosystemSrc = inputs.system-manager; + ecosystemSrc = sources: sources.system-manager; configModule = { imports = [ module ]; nixpkgs.overlays = [ (_final: _prev: { }) ]; @@ -3097,7 +3110,7 @@ let { lib, ... }: { caisson.system-manager.configurations.default = lib.caisson.system-manager.mkConfiguration { - ecosystemSrc = inputs.system-manager; + ecosystemSrc = sources: sources.system-manager; configModule = module; }; }; @@ -3128,7 +3141,7 @@ let hiveLib.caisson.integrations.topValue ( hiveLib.caisson-core.finalizeTop ( hiveLib.caisson.nixos-minimal.mkConfigurationWithEcosystemArgs { - ecosystemSrc = inputs.nixpkgs; + ecosystemSrc = sources: sources.nixpkgs; configModule = { lib, ... }: { @@ -3143,7 +3156,7 @@ let terraform = hiveLib.caisson.integrations.topValue ( hiveLib.caisson-core.finalizeTop ( hiveLib.caisson.terranix.mkConfigurationWithEcosystemArgs { - ecosystemSrc = inputs.terranix; + ecosystemSrc = sources: sources.terranix; configModule = { config.terraform.required_version = ">= 1.0"; }; @@ -3154,7 +3167,7 @@ let home = hiveLib.caisson.integrations.topValue ( hiveLib.caisson-core.finalizeTop ( hiveLib.caisson.home-manager.mkConfigurationWithEcosystemArgs { - ecosystemSrc = inputs.home-manager; + ecosystemSrc = sources: sources.home-manager; configModule = { home.username = "probe"; home.homeDirectory = "/home/probe"; @@ -3174,8 +3187,7 @@ let registeringLib = core.mkLib ( declaresPkgs // { - sources = { }; - defaultEcosystemSrc.nixpkgs-lib = inputs.nixpkgs-lib; + sources = { inherit (inputs) nixpkgs-lib nixpkgs; }; projects.caisson = inputs.caisson; modules = lib: { nixos.pinned-world-probe = lib.caisson-core.mkModule "nixos" ( @@ -3192,7 +3204,7 @@ let } ); system = registeringLib.caisson.nixos-minimal.mkTopConfiguration { - ecosystemSrc = inputs.nixpkgs; + ecosystemSrc = sources: sources.nixpkgs; configModule = { lib, ... }: { @@ -3208,8 +3220,7 @@ let manifestTravelsWithMkLibCompositions = let composedWithMkLib = core.mkLib { - sources = { }; - defaultEcosystemSrc.nixpkgs-lib = inputs.nixpkgs-lib; + sources = { inherit (inputs) nixpkgs-lib; }; projects.caisson = inputs.caisson; }; manifest = composedWithMkLib.caisson-core.libManifest; @@ -3255,9 +3266,7 @@ let systemsDeclaredOnMkLibReachFlakeParts = let composedWithSystems = core.mkLib { - sources = { }; - defaultEcosystemSrc.nixpkgs-lib = inputs.nixpkgs-lib; - defaultEcosystemSrc.flake-parts = inputs.flake-parts; + sources = { inherit (inputs) nixpkgs-lib flake-parts; }; systems = [ "x86_64-linux" "aarch64-linux" @@ -3285,15 +3294,14 @@ let composedFromProject = core.mkLib ( declaresPkgs // { - sources = { }; - defaultEcosystemSrc.nixpkgs-lib = inputs.nixpkgs-lib; + sources = { inherit (inputs) nixpkgs-lib nixpkgs; }; projects = { caisson = inputs.caisson; }; } ); system = composedFromProject.caisson.nixos-minimal.mkTopConfiguration { - ecosystemSrc = inputs.nixpkgs; + ecosystemSrc = sources: sources.nixpkgs; configModule = { pkgs, lib, ... }: { @@ -3306,13 +3314,24 @@ let && composedFromProject.caisson-core.libManifest.modules.flake ? "caisson/default" && system.config.probe; + # A tree's declared ecosystem sources reach the nixos-minimal + # adapter with no `ecosystemSrc` passed to its configuration: the + # package set from `nixpkgs`, the library from `nixpkgs-lib` and + # the NixOS module collection from `nixos`, each key declared + # separately, all three pointing at the same nixpkgs pin. declaredEcosystemServesAdapters = let composedWithDeclaration = core.mkLib ( declaresPkgs // { - sources = { }; - defaultEcosystemSrc.nixpkgs = inputs.nixpkgs; + sources = { + pinned-nixpkgs = inputs.nixpkgs; + }; + defaultEcosystemSrc = sources: { + nixpkgs = sources.pinned-nixpkgs; + nixpkgs-lib = sources.pinned-nixpkgs; + nixos = sources.pinned-nixpkgs; + }; projects.caisson = inputs.caisson; } ); @@ -3353,9 +3372,7 @@ let structuralTopMatchesFlakeParts = let composedWithBoth = core.mkLib { - sources = { }; - defaultEcosystemSrc.nixpkgs-lib = inputs.nixpkgs-lib; - defaultEcosystemSrc.flake-parts = inputs.flake-parts; + sources = { inherit (inputs) nixpkgs-lib flake-parts; }; systems = [ "x86_64-linux" ]; projects.caisson = inputs.caisson; }; diff --git a/tests/system-manager/sequence.nix b/tests/system-manager/sequence.nix index dec15dc2..444dc8fc 100644 --- a/tests/system-manager/sequence.nix +++ b/tests/system-manager/sequence.nix @@ -34,10 +34,7 @@ let pkgs = import inputs.nixpkgs { inherit system; }; lib = core.mkLib { - sources = { }; - systems = [ system ]; - projects.caisson = inputs.caisson; - defaultEcosystemSrc = { + sources = { inherit (inputs) nixpkgs system-manager @@ -46,6 +43,12 @@ let nvf ; }; + systems = [ system ]; + projects.caisson = inputs.caisson; + defaultEcosystemSrc = sources: { + nixpkgs-lib = sources.nixpkgs; + nixos = sources.nixpkgs; + }; pkgSets = _lib: { default = { name, parent }: diff --git a/tests/unit/flake.nix b/tests/unit/flake.nix index 27faa244..4f2d1061 100644 --- a/tests/unit/flake.nix +++ b/tests/unit/flake.nix @@ -48,7 +48,6 @@ pins = import (parent.outPath + "/lib-overlays/framework/pins"); lib = core.mkLib { inherit (pins.flake inputs) sources root; - defaultEcosystemSrc.nixpkgs-lib = inputs.nixpkgs-lib.outPath; # Registered from the parent's source path: a flake cannot # reference files outside its tree, and reading the # source forces none of the parent's outputs. The overlays diff --git a/tests/unit/lib-overlays.nix b/tests/unit/lib-overlays.nix index 1ad1be71..3cecd164 100644 --- a/tests/unit/lib-overlays.nix +++ b/tests/unit/lib-overlays.nix @@ -1752,7 +1752,7 @@ in "test: a declared ecosystem resolves for an adapter" = { expr = let - myLib = mkResolutionLib { defaultEcosystemSrc.terranix = terranixStub "declared"; }; + myLib = mkResolutionLib { defaultEcosystemSrc = sources: { terranix = terranixStub "declared"; }; }; in (myLib.caisson.terranix.mkTopConfiguration { configModule = { }; @@ -1763,15 +1763,33 @@ in "test: an explicit ecosystemSrc beats the declaration" = { expr = let - myLib = mkResolutionLib { defaultEcosystemSrc.terranix = terranixStub "declared"; }; + myLib = mkResolutionLib { defaultEcosystemSrc = sources: { terranix = terranixStub "declared"; }; }; in (myLib.caisson.terranix.mkTopConfiguration { - ecosystemSrc = terranixStub "explicit"; + ecosystemSrc = sources: terranixStub "explicit"; configModule = { }; }).stubbed; expected = "explicit"; }; + # `ecosystemSrc` selects from the tree's sources, so a + # configuration gives it as a function; a value is refused before + # resolution runs. + "test: an ecosystemSrc given as a value is refused" = { + expr = + let + myLib = mkResolutionLib { }; + in + (myLib.caisson.terranix.mkTopConfiguration { + ecosystemSrc = terranixStub "explicit"; + configModule = { }; + }).stubbed; + expectedError = { + type = "ThrownError"; + msg = "caisson\\.terranix: `ecosystemSrc` is a function of the tree's sources that\\s+returns the source to use, `ecosystemSrc = sources: sources\\.;`,\\s+but got a set\\."; + }; + }; + "test: an input with the exact name is the last channel" = { expr = let @@ -1794,7 +1812,7 @@ in sources = mockSources // { terranix = terranixStub "input"; }; - defaultEcosystemSrc.terranix = terranixStub "declared"; + defaultEcosystemSrc = sources: { terranix = terranixStub "declared"; }; }; in (myLib.caisson.terranix.mkTopConfiguration { @@ -1818,7 +1836,7 @@ in "test: declarations join the manifest" = { expr = let - myLib = mkResolutionLib { defaultEcosystemSrc.terranix = terranixStub "declared"; }; + myLib = mkResolutionLib { defaultEcosystemSrc = sources: { terranix = terranixStub "declared"; }; }; in (myLib.caisson-core.libManifest.defaultEcosystemSrc.terranix.lib.terranixConfiguration { }).stubbed; expected = "declared"; @@ -1838,11 +1856,20 @@ in nixosLib = let nixosStub = ./nixos-stub; + # mockSources with the nixos stub added, under a name a + # composition's `defaultEcosystemSrc` selects. + sourcesWithNixos = mockSources // { + inherit nixosStub; + }; + nixosEcosystemSrc = sources: { + nixpkgs = sources.nixosStub; + nixos = sources.nixosStub; + }; mkComposition = extraOverlays: caisson.mkLib { - sources = mockSources; - defaultEcosystemSrc.nixpkgs = nixosStub; + sources = sourcesWithNixos; + defaultEcosystemSrc = nixosEcosystemSrc; # A configuration takes its system and its package set from # the composition. systems = [ "x86_64-linux" ]; @@ -1879,9 +1906,9 @@ in # `machine`, which records the name and the system its evaluation # carries. publishingLib = caisson.mkLib { - sources = mockSources; + sources = sourcesWithNixos; name = "publishing"; - defaultEcosystemSrc.nixpkgs = nixosStub; + defaultEcosystemSrc = nixosEcosystemSrc; systems = [ "x86_64-linux" ]; pkgSets = stubPkgSets { default = { }; }; libOverlays = _lib: { @@ -2205,9 +2232,9 @@ in expr = let noDefault = caisson.mkLib { - sources = mockSources; + sources = sourcesWithNixos; name = "no-default"; - defaultEcosystemSrc.nixpkgs = nixosStub; + defaultEcosystemSrc = nixosEcosystemSrc; systems = [ "x86_64-linux" ]; pkgSets = stubPkgSets { stable = { }; }; libOverlays = _lib: { @@ -2269,9 +2296,9 @@ in on = systems: caisson.mkLib { - sources = mockSources; + sources = sourcesWithNixos; name = "machine"; - defaultEcosystemSrc.nixpkgs = nixosStub; + defaultEcosystemSrc = nixosEcosystemSrc; inherit systems; libOverlays = _lib: { nixos = mkLibOverlay (inputs.parent.outPath + "/lib-overlays/nixos"); @@ -2362,9 +2389,9 @@ in expr = let minimalLib = caisson.mkLib { - sources = mockSources; + sources = sourcesWithNixos; name = "publishing"; - defaultEcosystemSrc.nixpkgs = nixosStub; + defaultEcosystemSrc = nixosEcosystemSrc; systems = [ "x86_64-linux" ]; pkgSets = stubPkgSets { default = { }; }; libOverlays = _lib: { @@ -2474,9 +2501,9 @@ in }; }; everyLib = caisson.mkLib { - sources = mockSources; + sources = sourcesWithNixos; name = "publishing"; - defaultEcosystemSrc.nixpkgs = nixosStub; + defaultEcosystemSrc = nixosEcosystemSrc; systems = [ "x86_64-linux" ]; pkgSets = stubPkgSets { default = { }; }; libOverlays = _lib: { @@ -2580,9 +2607,9 @@ in # The modules are registered in the composition. A # configuration selects from that registry. registeringModulesLib = caisson.mkLib { - sources = mockSources; + sources = sourcesWithNixos; name = "registering-modules"; - defaultEcosystemSrc.nixpkgs = nixosStub; + defaultEcosystemSrc = nixosEcosystemSrc; systems = [ "x86_64-linux" ]; pkgSets = stubPkgSets { default = { }; }; libOverlays = _lib: { @@ -2879,9 +2906,9 @@ in expr = let severalLib = caisson.mkLib { - sources = mockSources; + sources = sourcesWithNixos; name = "several"; - defaultEcosystemSrc.nixpkgs = nixosStub; + defaultEcosystemSrc = nixosEcosystemSrc; systems = [ "x86_64-linux" "aarch64-linux" @@ -2924,9 +2951,9 @@ in expr = let oneSystemLib = caisson.mkLib { - sources = mockSources; + sources = sourcesWithNixos; name = "one-system"; - defaultEcosystemSrc.nixpkgs = nixosStub; + defaultEcosystemSrc = nixosEcosystemSrc; systems = [ "x86_64-linux" ]; libOverlays = _lib: { nixos = mkLibOverlay (inputs.parent.outPath + "/lib-overlays/nixos"); @@ -3108,7 +3135,9 @@ in caisson.mkLib ( homeComposition // { - sources = mockSources; + sources = mockSources // { + inherit hmStub hmStubCopy; + }; libOverlays = _lib: { @@ -3129,7 +3158,9 @@ in } // declaration ); - mkComposition = mkCompositionWith { defaultEcosystemSrc.home-manager = hmStub; }; + mkComposition = mkCompositionWith { + defaultEcosystemSrc = sources: { home-manager = sources.hmStub; }; + }; myLib = mkComposition { }; # A composition that declares no home-manager: no # `defaultEcosystemSrc.home-manager`, and no input of that name. @@ -3151,7 +3182,9 @@ in caisson.mkLib ( homeComposition // { - sources = mockSources; + sources = mockSources // { + inherit hmStub; + }; libOverlays = _lib: { home-manager = { imports = [ @@ -3198,11 +3231,15 @@ in treeLibWith = systems: caisson.mkLib { - sources = mockSources; + sources = mockSources // { + nixosStub = ./nixos-stub; + inherit hmStub; + }; name = "homes"; - defaultEcosystemSrc = { - nixpkgs = ./nixos-stub; - home-manager = hmStub; + defaultEcosystemSrc = sources: { + nixpkgs = sources.nixosStub; + nixos = sources.nixosStub; + home-manager = sources.hmStub; }; inherit systems; pkgSets = @@ -3343,7 +3380,8 @@ in "test: lib.maintainers carries both lists" = { expr = builtins.attrNames - (mkMaintainersComposition { defaultEcosystemSrc.home-manager = hmStub; }).maintainers; + (mkMaintainersComposition { defaultEcosystemSrc = sources: { home-manager = sources.hmStub; }; }) + .maintainers; expected = [ "a-nixpkgs-maintainer" "home-manager-stub-maintainer" @@ -3363,7 +3401,7 @@ in "test: an evaluation naming its home-manager merges its maintainers" = { expr = ((mkMaintainersComposition { }).caisson.home-manager.mkTopConfiguration { - ecosystemSrc = hmStub; + ecosystemSrc = sources: sources.hmStub; configModule = { lib, ... }: { @@ -3484,7 +3522,7 @@ in "test: an evaluation naming the declared tree runs on the composed library" = { expr = (myLib.caisson.home-manager.mkTopConfiguration { - ecosystemSrc = hmStub; + ecosystemSrc = sources: sources.hmStub; configModule = probeModule; check = false; }).config.seenLib; @@ -3505,7 +3543,7 @@ in expr = builtins.deepSeq (myLib.caisson.home-manager.mkTopConfiguration { - ecosystemSrc = hmStubCopy; + ecosystemSrc = sources: sources.hmStubCopy; configModule = probeModule; check = false; }).config.seenLib @@ -3524,7 +3562,7 @@ in "test: an evaluation names its home-manager when the composition declares none" = { expr = (undeclaredLib.caisson.home-manager.mkTopConfiguration { - ecosystemSrc = hmStub; + ecosystemSrc = sources: sources.hmStub; configModule = probeModule; check = false; }).config.seenLib; @@ -3544,7 +3582,7 @@ in expr = let evaluated = undeclaredLib.caisson.home-manager.mkTopConfiguration { - ecosystemSrc = hmStub; + ecosystemSrc = sources: sources.hmStub; configModule = { config, lib, ... }: { @@ -3606,7 +3644,7 @@ in in { declared = seenUnder myLib { }; - named = seenUnder undeclaredLib { ecosystemSrc = hmStub; }; + named = seenUnder undeclaredLib { ecosystemSrc = sources: sources.hmStub; }; }; expected = { declared = { @@ -5490,7 +5528,7 @@ in { lib, ... }: { caisson.caisson-colmena.configurations.default = lib.caisson.caisson-colmena.mkConfiguration { - ecosystemSrc = colmenaStub; + ecosystemSrc = _sources: colmenaStub; configModule.meta.description = "probe"; }; }; @@ -5540,8 +5578,10 @@ in mkCompositionWith = sets: caisson.mkLib { - sources = mockSources; - defaultEcosystemSrc.home-manager = hmStub; + sources = mockSources // { + inherit hmStub; + }; + defaultEcosystemSrc = sources: { home-manager = sources.hmStub; }; # A home-manager configuration takes its system and its # package set from the composition. systems = [ "x86_64-linux" ]; From 671a09b47b905edd0ae8f3f802ef2e1322a0cf6b Mon Sep 17 00:00:00 2001 From: Chris Hodapp Date: Wed, 21 Oct 2026 22:22:14 -0700 Subject: [PATCH 2/5] feat(nixpkgs): take maintainers and teams from the package set's source 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 --- configs/flake/caisson/partitions/checks.nix | 5 +++ lib-overlays/nixpkgs/default.nix | 23 +++++++++++ .../flake/nixpkgs-lib-only/default.nix | 29 ++++++++++++++ tests/integration/nixpkgs-lib-only/flake.nix | 40 +++++++++++++++++++ 4 files changed, 97 insertions(+) create mode 100644 tests/integration/nixpkgs-lib-only/configs/flake/nixpkgs-lib-only/default.nix create mode 100644 tests/integration/nixpkgs-lib-only/flake.nix diff --git a/configs/flake/caisson/partitions/checks.nix b/configs/flake/caisson/partitions/checks.nix index 10cbbdf4..f731c2d1 100644 --- a/configs/flake/caisson/partitions/checks.nix +++ b/configs/flake/caisson/partitions/checks.nix @@ -91,6 +91,10 @@ path = self.outPath + "/tests/integration/nixpkgs-pkg-sets"; }; + nixpkgsLibOnlyOutputs = callConsumer { + path = self.outPath + "/tests/integration/nixpkgs-lib-only"; + }; + # A project that registers package overlays, and a consumer # that takes them through `projects`. pkgOverlaysProducerOutputs = callConsumer { @@ -161,6 +165,7 @@ // nixpkgsOverlayExportOutputs.checks.${system} // nixpkgsNoPkgSetsOutputs.checks.${system} // nixpkgsPkgSetsOutputs.checks.${system} + // nixpkgsLibOnlyOutputs.checks.${system} // pkgOverlaysProducerOutputs.checks.${system} // pkgOverlaysConsumerOutputs.checks.${system} // unitTestOutputs.checks.${system} diff --git a/lib-overlays/nixpkgs/default.nix b/lib-overlays/nixpkgs/default.nix index f4c45bee..25f619a4 100644 --- a/lib-overlays/nixpkgs/default.nix +++ b/lib-overlays/nixpkgs/default.nix @@ -492,11 +492,34 @@ }; }; + + # The source of the package set this lib is built for, or null + # where the lib is built for no package set. A package set's lib + # carries the set's manifest as `pkgsManifest`, and the manifest + # of its package config records the source as `ecosystemSrc`. + packageSetSrc = + let + setManifest = (final.caisson-core or { }).pkgsManifest or null; + in + if setManifest == null then null else setManifest.parent.ecosystemSrc or null; + + # The library that the package set's source defines, read for + # its package information only. + packageSetLib = builtins.import "${packageSetSrc}/lib"; in { caisson = (prev.caisson or { }) // { nixpkgs = prevNs // integration.namespace; }; + + # `maintainers` and `teams` describe the packages of a package + # set. nixpkgs keeps them in its library, read from the + # `maintainers` directory of the checkout, and the library of the + # composition can come from a source without that directory, such + # as the nixpkgs.lib mirror. Inside a package set they come from + # the source of that package set, as that source defines them. + maintainers = if packageSetSrc == null then prev.maintainers else packageSetLib.maintainers; + teams = if packageSetSrc == null then prev.teams else packageSetLib.teams; } ); diff --git a/tests/integration/nixpkgs-lib-only/configs/flake/nixpkgs-lib-only/default.nix b/tests/integration/nixpkgs-lib-only/configs/flake/nixpkgs-lib-only/default.nix new file mode 100644 index 00000000..1f9ab8e4 --- /dev/null +++ b/tests/integration/nixpkgs-lib-only/configs/flake/nixpkgs-lib-only/default.nix @@ -0,0 +1,29 @@ +# SPDX-License-Identifier: MIT +# +# Builds a package set on a library whose source holds only nixpkgs' +# `lib` directory. nixpkgs checks the maintainers of every derivation +# it creates, so the set evaluates only if its lib carries the +# `maintainers` and `teams` of the package set's source. +{ ... }: +{ + inputs, + lib, + ... +}: +{ + systems = [ "x86_64-linux" ]; + + perSystem = + { system, ... }: + let + pkgs = lib.caisson.nixpkgs.pkgSets.default.children.nixpkgs.${system}.value; + upstream = import inputs.nixpkgs { inherit system; }; + in + { + checks.nixpkgs-lib-only = + assert pkgs.hello.drvPath == upstream.hello.drvPath; + assert pkgs.lib.maintainers == upstream.lib.maintainers; + assert builtins.attrNames pkgs.lib.teams == builtins.attrNames upstream.lib.teams; + pkgs.runCommand "nixpkgs-lib-only" { } "touch $out"; + }; +} diff --git a/tests/integration/nixpkgs-lib-only/flake.nix b/tests/integration/nixpkgs-lib-only/flake.nix new file mode 100644 index 00000000..c8db2727 --- /dev/null +++ b/tests/integration/nixpkgs-lib-only/flake.nix @@ -0,0 +1,40 @@ +# SPDX-License-Identifier: MIT +{ + description = "Integration test: a package set built on a library source that holds only nixpkgs' lib directory"; + + inputs = { + deps.url = "path:../../dependencies"; + + parent.url = "path:../../.."; + + nixpkgs.follows = "deps/nixpkgs"; + flake-parts.follows = "deps/flake-parts"; + }; + + outputs = + inputs@{ parent, ... }: + let + core = parent.lib.caisson; + lib = core.mkLib { + inherit (core.pins.flake inputs) sources root; + name = "nixpkgs-lib-only"; + systems = [ "x86_64-linux" ]; + projects = { + caisson = parent; + }; + # The library comes from a copy of the `lib` directory alone, + # laid out as the nixpkgs.lib mirror is. The package set comes + # from the full checkout, pinned as `nixpkgs`. + defaultEcosystemSrc = sources: { + nixpkgs-lib = builtins.path { + path = "${sources.nixpkgs}/lib"; + name = "nixpkgs-lib-only"; + }; + }; + pkgSets = lib: { default = lib.caisson.nixpkgs.mkConfiguration { }; }; + }; + in + lib.caisson.flake-parts.mkTopConfiguration { + configModule = lib.caisson.flake-parts.mkModule ./configs/flake/nixpkgs-lib-only; + }; +} From d1241ba7b916a84bc8f67dd9623b7dc080e6e2bd Mon Sep 17 00:00:00 2001 From: Chris Hodapp Date: Wed, 21 Oct 2026 22:41:18 -0700 Subject: [PATCH 3/5] feat(nixpkgs): take licenses and sourceTypes from the package set's source 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 --- lib-overlays/nixpkgs/default.nix | 18 ++++++++++++------ .../configs/flake/nixpkgs-lib-only/default.nix | 5 ++++- 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/lib-overlays/nixpkgs/default.nix b/lib-overlays/nixpkgs/default.nix index 25f619a4..136b70eb 100644 --- a/lib-overlays/nixpkgs/default.nix +++ b/lib-overlays/nixpkgs/default.nix @@ -512,14 +512,20 @@ nixpkgs = prevNs // integration.namespace; }; - # `maintainers` and `teams` describe the packages of a package - # set. nixpkgs keeps them in its library, read from the - # `maintainers` directory of the checkout, and the library of the - # composition can come from a source without that directory, such - # as the nixpkgs.lib mirror. Inside a package set they come from - # the source of that package set, as that source defines them. + # `maintainers`, `teams`, `licenses` and `sourceTypes` describe + # the packages of a package set, and nixpkgs keeps them in its + # library. Inside a package set they come from the source of that + # package set, as that source defines them. The library of the + # composition can come from another source. The nixpkgs.lib + # mirror holds `lib/` alone, and nixpkgs reads `maintainers` and + # `teams` from the `maintainers` directory beside `lib/`. A + # library of another revision holds the licenses of that + # revision, and the packages of a set name the licenses of the + # revision of the set. maintainers = if packageSetSrc == null then prev.maintainers else packageSetLib.maintainers; teams = if packageSetSrc == null then prev.teams else packageSetLib.teams; + licenses = if packageSetSrc == null then prev.licenses else packageSetLib.licenses; + sourceTypes = if packageSetSrc == null then prev.sourceTypes else packageSetLib.sourceTypes; } ); diff --git a/tests/integration/nixpkgs-lib-only/configs/flake/nixpkgs-lib-only/default.nix b/tests/integration/nixpkgs-lib-only/configs/flake/nixpkgs-lib-only/default.nix index 1f9ab8e4..a4a8fb41 100644 --- a/tests/integration/nixpkgs-lib-only/configs/flake/nixpkgs-lib-only/default.nix +++ b/tests/integration/nixpkgs-lib-only/configs/flake/nixpkgs-lib-only/default.nix @@ -3,7 +3,8 @@ # Builds a package set on a library whose source holds only nixpkgs' # `lib` directory. nixpkgs checks the maintainers of every derivation # it creates, so the set evaluates only if its lib carries the -# `maintainers` and `teams` of the package set's source. +# `maintainers` and `teams` of the package set's source. The set's lib +# also carries the `licenses` and `sourceTypes` of that source. { ... }: { inputs, @@ -24,6 +25,8 @@ assert pkgs.hello.drvPath == upstream.hello.drvPath; assert pkgs.lib.maintainers == upstream.lib.maintainers; assert builtins.attrNames pkgs.lib.teams == builtins.attrNames upstream.lib.teams; + assert pkgs.lib.licenses == upstream.lib.licenses; + assert pkgs.lib.sourceTypes == upstream.lib.sourceTypes; pkgs.runCommand "nixpkgs-lib-only" { } "touch $out"; }; } From f5d08380e6829bd45c660a2993de951ed07d0309 Mon Sep 17 00:00:00 2001 From: Chris Hodapp Date: Wed, 21 Oct 2026 23:22:22 -0700 Subject: [PATCH 4/5] feat(nixpkgs): take the package-set libraries 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: 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 --- lib-overlays/nixpkgs/default.nix | 120 +++++++++++++----- .../flake/nixpkgs-lib-only/default.nix | 25 +++- tests/integration/nixpkgs-lib-only/flake.nix | 1 + .../lib-overlays/default/default.nix | 12 ++ 4 files changed, 125 insertions(+), 33 deletions(-) create mode 100644 tests/integration/nixpkgs-lib-only/lib-overlays/default/default.nix diff --git a/lib-overlays/nixpkgs/default.nix b/lib-overlays/nixpkgs/default.nix index 136b70eb..30bc2d84 100644 --- a/lib-overlays/nixpkgs/default.nix +++ b/lib-overlays/nixpkgs/default.nix @@ -54,6 +54,95 @@ final.filterAttrs (name: _: name == "default" || final.hasSuffix "/default" name) registry ); + # nixpkgs' library holds two kinds of library. The general + # utilities and the module system serve every evaluation, and the + # composition supplies them from the `nixpkgs-lib` key. The + # package-set libraries describe and build packages: the platform + # model, the package metadata and its tables, the `callPackage` + # machinery, the fetchers and version comparison. The packages of + # a set are written against the package-set libraries of the + # revision of the set, so a package set's lib takes them from the + # source of the set. + # + # `packageSetLibraries` are sublibraries whose functions nixpkgs + # also publishes at the top level of its library. `packageSetData` + # are tables taken whole. `generalLibraries` are the general + # sublibraries. A top-level name that belongs to a package-set + # library and to a general library stays with the general + # library: `compareVersions` is one, defined in `versions` and in + # `strings` as the same builtin. + packageSetLibraries = [ + "systems" + "meta" + "customisation" + "derivations" + "fetchers" + "versions" + ]; + packageSetData = [ + "licenses" + "sourceTypes" + "maintainers" + "teams" + "platforms" + ]; + generalLibraries = [ + "trivial" + "fixedPoints" + "attrsets" + "lists" + "strings" + "stringsWithDeps" + "modules" + "options" + "types" + "cli" + "gvariant" + "generators" + "asserts" + "debug" + "services" + "path" + "filesystem" + "fileset" + "sources" + "kernel" + "network" + "flakes" + ]; + + # The lib a package set at `src` runs on: `base`, the composed lib + # with the set's manifest, with the package-set libraries of the + # library at `src`. The top-level names taken are the + # package-set libraries, the tables, and every top-level name of + # the library at `src` that is also a function of a package-set + # library and of no general library, which is how nixpkgs + # publishes `callPackageWith`, + # `getExe` and the rest. Each value is the value at `src`, and a + # function taken from there runs on the fixpoint of the library at + # `src`. The lib is an attribute merge over `base`: nixpkgs hands + # it to the packages as `pkgs.lib` and builds no fixpoint over it. + packageSetLib = + src: base: + let + sourceLib = builtins.import "${src}/lib"; + present = builtins.filter (name: sourceLib ? ${name}); + libraries = present packageSetLibraries; + general = present generalLibraries; + memberOf = group: name: builtins.any (library: sourceLib.${library} ? ${name}) group; + reExports = builtins.filter ( + name: !(builtins.elem name libraries) && memberOf libraries name && !(memberOf general name) + ) (builtins.attrNames sourceLib); + names = libraries ++ present packageSetData ++ reExports; + in + base + // builtins.listToAttrs ( + builtins.map (name: { + inherit name; + value = sourceLib.${name}; + }) names + ); + # The package set of nixpkgs at `src`, instantiated as # `pkgs/top-level/default.nix` instantiates it, from arguments # caisson has already resolved: `lib` is the composed lib the @@ -288,7 +377,7 @@ }; pkgs = instantiate src ( { - lib = lib.caisson-core.withManifests { pkgsManifest = setManifest; }; + lib = packageSetLib src (lib.caisson-core.withManifests { pkgsManifest = setManifest; }); localSystem = { inherit system; }; inherit config overlays; } @@ -492,40 +581,11 @@ }; }; - - # The source of the package set this lib is built for, or null - # where the lib is built for no package set. A package set's lib - # carries the set's manifest as `pkgsManifest`, and the manifest - # of its package config records the source as `ecosystemSrc`. - packageSetSrc = - let - setManifest = (final.caisson-core or { }).pkgsManifest or null; - in - if setManifest == null then null else setManifest.parent.ecosystemSrc or null; - - # The library that the package set's source defines, read for - # its package information only. - packageSetLib = builtins.import "${packageSetSrc}/lib"; in { caisson = (prev.caisson or { }) // { nixpkgs = prevNs // integration.namespace; }; - - # `maintainers`, `teams`, `licenses` and `sourceTypes` describe - # the packages of a package set, and nixpkgs keeps them in its - # library. Inside a package set they come from the source of that - # package set, as that source defines them. The library of the - # composition can come from another source. The nixpkgs.lib - # mirror holds `lib/` alone, and nixpkgs reads `maintainers` and - # `teams` from the `maintainers` directory beside `lib/`. A - # library of another revision holds the licenses of that - # revision, and the packages of a set name the licenses of the - # revision of the set. - maintainers = if packageSetSrc == null then prev.maintainers else packageSetLib.maintainers; - teams = if packageSetSrc == null then prev.teams else packageSetLib.teams; - licenses = if packageSetSrc == null then prev.licenses else packageSetLib.licenses; - sourceTypes = if packageSetSrc == null then prev.sourceTypes else packageSetLib.sourceTypes; } ); diff --git a/tests/integration/nixpkgs-lib-only/configs/flake/nixpkgs-lib-only/default.nix b/tests/integration/nixpkgs-lib-only/configs/flake/nixpkgs-lib-only/default.nix index a4a8fb41..a52ad32e 100644 --- a/tests/integration/nixpkgs-lib-only/configs/flake/nixpkgs-lib-only/default.nix +++ b/tests/integration/nixpkgs-lib-only/configs/flake/nixpkgs-lib-only/default.nix @@ -3,8 +3,11 @@ # Builds a package set on a library whose source holds only nixpkgs' # `lib` directory. nixpkgs checks the maintainers of every derivation # it creates, so the set evaluates only if its lib carries the -# `maintainers` and `teams` of the package set's source. The set's lib -# also carries the `licenses` and `sourceTypes` of that source. +# `maintainers` and `teams` of the package set's source. The checks +# read where each function of the set's lib is defined: the +# package-set libraries and their top-level names come from the +# package set's source, and the general utilities from the library of +# the composition. { ... }: { inputs, @@ -19,6 +22,11 @@ let pkgs = lib.caisson.nixpkgs.pkgSets.default.children.nixpkgs.${system}.value; upstream = import inputs.nixpkgs { inherit system; }; + fileOf = name: set: (builtins.unsafeGetAttrPos name set).file; + # Whether the attribute `name` of `set` is defined in the library + # of the package set's source. + fromSet = name: set: lib.hasPrefix "${inputs.nixpkgs}/lib/" (fileOf name set); + marked = "marked by the composition"; in { checks.nixpkgs-lib-only = @@ -26,7 +34,18 @@ assert pkgs.lib.maintainers == upstream.lib.maintainers; assert builtins.attrNames pkgs.lib.teams == builtins.attrNames upstream.lib.teams; assert pkgs.lib.licenses == upstream.lib.licenses; - assert pkgs.lib.sourceTypes == upstream.lib.sourceTypes; + assert pkgs.lib.platforms == upstream.lib.platforms; + assert fromSet "getExe" pkgs.lib.meta; + assert fromSet "callPackageWith" pkgs.lib.customisation; + assert fromSet "elaborate" pkgs.lib.systems; + assert !(fromSet "splitString" pkgs.lib.strings); + assert !(fromSet "evalModules" pkgs.lib.modules); + # The test's lib overlay marks `getExe` and `splitString` in the + # composed lib. The package set's lib takes `getExe` from the + # package set's source and keeps the general `splitString`. + assert lib.getExe pkgs.hello == marked; + assert pkgs.lib.getExe pkgs.hello == upstream.lib.getExe upstream.hello; + assert pkgs.lib.splitString "," "a,b" == [ marked ]; pkgs.runCommand "nixpkgs-lib-only" { } "touch $out"; }; } diff --git a/tests/integration/nixpkgs-lib-only/flake.nix b/tests/integration/nixpkgs-lib-only/flake.nix index c8db2727..6b6d592a 100644 --- a/tests/integration/nixpkgs-lib-only/flake.nix +++ b/tests/integration/nixpkgs-lib-only/flake.nix @@ -31,6 +31,7 @@ name = "nixpkgs-lib-only"; }; }; + libOverlays = lib: lib.caisson.mkLibOverlays ./lib-overlays; pkgSets = lib: { default = lib.caisson.nixpkgs.mkConfiguration { }; }; }; in diff --git a/tests/integration/nixpkgs-lib-only/lib-overlays/default/default.nix b/tests/integration/nixpkgs-lib-only/lib-overlays/default/default.nix new file mode 100644 index 00000000..c744a6db --- /dev/null +++ b/tests/integration/nixpkgs-lib-only/lib-overlays/default/default.nix @@ -0,0 +1,12 @@ +# SPDX-License-Identifier: MIT +# +# Marks two functions of the composed lib: `getExe`, of the package-set +# library `meta`, and `splitString`, a general utility. The checks read +# which of the two a package set's lib still carries. +{ ... }: +{ + overlay = _final: _prev: { + getExe = _: "marked by the composition"; + splitString = _: _: [ "marked by the composition" ]; + }; +} From e52ae3aacc930526d263fb559ee214203bb01c5a Mon Sep 17 00:00:00 2001 From: Chris Hodapp Date: Wed, 21 Oct 2026 23:43:18 -0700 Subject: [PATCH 5/5] maint: lock caisson-core to main Co-Authored-By: Claude Opus 5.5 --- flake.lock | 4 ++-- tests/dependencies/flake.lock | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/flake.lock b/flake.lock index a8eadd30..7166251d 100644 --- a/flake.lock +++ b/flake.lock @@ -2,11 +2,11 @@ "nodes": { "caisson-core": { "locked": { - "lastModified": 1792565916, + "lastModified": 1792651257, "narHash": "sha256-5SMkHLn3uyGkzCl6/VAxLoZ08fRlq9lrhD0JbuO8eUI=", "owner": "nix-caisson", "repo": "caisson-core", - "rev": "84e25f84c40edd62324f508c5f5db4bbf0b8b883", + "rev": "9e1bdf63c237d6559bd4291688ae992a9933f67e", "type": "github" }, "original": { diff --git a/tests/dependencies/flake.lock b/tests/dependencies/flake.lock index 3682a7ac..961af29a 100644 --- a/tests/dependencies/flake.lock +++ b/tests/dependencies/flake.lock @@ -2,11 +2,11 @@ "nodes": { "caisson-core": { "locked": { - "lastModified": 1792565916, + "lastModified": 1792651257, "narHash": "sha256-5SMkHLn3uyGkzCl6/VAxLoZ08fRlq9lrhD0JbuO8eUI=", "owner": "nix-caisson", "repo": "caisson-core", - "rev": "84e25f84c40edd62324f508c5f5db4bbf0b8b883", + "rev": "9e1bdf63c237d6559bd4291688ae992a9933f67e", "type": "github" }, "original": {