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

22
flake.lock generated
View file

@ -1,6 +1,26 @@
{ {
"nodes": { "nodes": {
"root": {} "nixpkgs": {
"locked": {
"lastModified": 1767313136,
"narHash": "sha256-16KkgfdYqjaeRGBaYsNrhPRRENs0qzkQVUooNHtoy2w=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "ac62194c3917d5f474c1a844b6fd6da2db95077d",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-25.05",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"nixpkgs": "nixpkgs"
}
}
}, },
"root": "root", "root": "root",
"version": 7 "version": 7

View file

@ -1,17 +1,56 @@
{ {
description = "NixTypes (nt)"; 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*) # Step 1: Bootstrap and blast off (*zooommmmm whoooosshhhhh pppppeeeeeeewww*)
bootstrap = import ./nt/primitives/bootstrap; bootstrap = import ./nt/primitives/bootstrap;
# Step 2: Lie to Mix about its real identity (it's not ready for the truth...) # Step 2: Lie to Mix about its real identity (it's not ready for the truth...)
mix = import ./nt/mix {this = bootstrap;}; mix = import ./nt/mix {this = bootstrap;};
in in
# Step 3: Actually import NixTypes newMixture base (mixture: {
import ./nt { includes.public = [
inherit mix; (extend ./flake deps)
flake = inputs.self; # Step 3: Actually import NixTypes
}; ./nt
];
});
# Step 4: Like and subscripe!!1!11!!!!! # Step 4: Like and subscripe!!1!11!!!!!
} }