isolate ./nt and ./flake mixtures

This commit is contained in:
Emile Clark-Boman 2026-01-27 17:51:17 +10:00
parent bc2a62e62b
commit 166c185ca4
2 changed files with 67 additions and 8 deletions

View file

@ -1,17 +1,56 @@
{
description = "NixTypes (nt)";
outputs = inputs: let
inputs = {
systems.url = "github:nix-systems/default";
# NOTE: nixpkgs is only used in devshells
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.05";
# NOTE: nix-unit is only used in checks
nix-unit = {
url = "github:nix-community/nix-unit";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = {
self,
systems,
nixpkgs,
nix-unit,
}: let
# TODO: implement mix.extend and mix.isolate
inherit
(mix)
extend
# isolate
newMixture
;
# inputs accessible to all modules
base = {
inherit mix;
flake = self;
};
# flake dependencies
# NOTE: the NixTypes library has no dependencies
# NOTE: but the developer tooling (for me) does
deps = {
inherit systems nixpkgs nix-unit;
};
# Step 1: Bootstrap and blast off (*zooommmmm whoooosshhhhh pppppeeeeeeewww*)
bootstrap = import ./nt/primitives/bootstrap;
# Step 2: Lie to Mix about its real identity (it's not ready for the truth...)
mix = import ./nt/mix {this = bootstrap;};
in
# Step 3: Actually import NixTypes
import ./nt {
inherit mix;
flake = inputs.self;
};
newMixture base (mixture: {
includes.public = [
(extend ./flake deps)
# Step 3: Actually import NixTypes
./nt
];
});
# Step 4: Like and subscripe!!1!11!!!!!
}