bootstrap auto propagates this
This commit is contained in:
parent
73720c33ba
commit
79a6c6729b
4 changed files with 21 additions and 27 deletions
|
|
@ -12,7 +12,10 @@ let
|
|||
;
|
||||
|
||||
# NOTE: bootstrap does the equivalent to mix's `include.public` option.
|
||||
bootstrap = inputs: let
|
||||
bootstrap = extraInputs: target: let
|
||||
this = delegate target;
|
||||
inputs = {inherit this;} // extraInputs;
|
||||
|
||||
delegate = target:
|
||||
# PATH
|
||||
if isPath target
|
||||
|
|
@ -26,9 +29,9 @@ let
|
|||
# FUNCTION (OR FAIL)
|
||||
else target inputs;
|
||||
in
|
||||
delegate;
|
||||
|
||||
this = bootstrap {inherit this bootstrap;} [
|
||||
this;
|
||||
in
|
||||
bootstrap {} [
|
||||
./nt.nix
|
||||
{
|
||||
bootstrap = _: bootstrap;
|
||||
|
|
@ -38,6 +41,4 @@ let
|
|||
maybe = ./maybe.nix;
|
||||
trapdoor = ./trapdoor.nix;
|
||||
}
|
||||
];
|
||||
in
|
||||
this
|
||||
]
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
{this, ...}: let
|
||||
{...}: let
|
||||
inherit
|
||||
(builtins)
|
||||
attrNames
|
||||
|
|
@ -6,11 +6,6 @@
|
|||
isAttrs
|
||||
typeOf
|
||||
;
|
||||
|
||||
inherit
|
||||
(this.std)
|
||||
id
|
||||
;
|
||||
in rec {
|
||||
# NOTE: Maybe intentionally doesn't use the NixTypes.
|
||||
# NOTE: Maybe is used to aid in parsing and bootstrapping.
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# WARNING: /nt/primitives/bootstrap cannot depend on mix
|
||||
# WARNING: this file is strictly for bootstrapping nt
|
||||
{bootstrap, ...} @ inputs:
|
||||
bootstrap inputs [
|
||||
{this, ...} @ inputs:
|
||||
this.bootstrap inputs [
|
||||
./parse.nix
|
||||
./sig.nix
|
||||
]
|
||||
|
|
|
|||
|
|
@ -1,14 +1,12 @@
|
|||
# WARNING: /nt/primitives/bootstrap cannot depend on mix
|
||||
# WARNING: this file is strictly for bootstrapping nt
|
||||
{bootstrap, ...}: let
|
||||
# WARNING: do not propagate `this` from parent, bootstrap/std must
|
||||
# WARNING: remain entirely independent from bootstrap
|
||||
this = bootstrap {inherit this bootstrap;} [
|
||||
./attrs.nix
|
||||
./fn.nix
|
||||
./list.nix
|
||||
./num.nix
|
||||
./string.nix
|
||||
];
|
||||
in
|
||||
this
|
||||
{this, ...}:
|
||||
# WARNING: do not propagate `this` from parent, bootstrap/std must
|
||||
# WARNING: remain entirely independent from bootstrap/
|
||||
this.bootstrap {} [
|
||||
./attrs.nix
|
||||
./fn.nix
|
||||
./list.nix
|
||||
./num.nix
|
||||
./string.nix
|
||||
]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue