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.
|
# 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:
|
delegate = target:
|
||||||
# PATH
|
# PATH
|
||||||
if isPath target
|
if isPath target
|
||||||
|
|
@ -26,9 +29,9 @@ let
|
||||||
# FUNCTION (OR FAIL)
|
# FUNCTION (OR FAIL)
|
||||||
else target inputs;
|
else target inputs;
|
||||||
in
|
in
|
||||||
delegate;
|
this;
|
||||||
|
in
|
||||||
this = bootstrap {inherit this bootstrap;} [
|
bootstrap {} [
|
||||||
./nt.nix
|
./nt.nix
|
||||||
{
|
{
|
||||||
bootstrap = _: bootstrap;
|
bootstrap = _: bootstrap;
|
||||||
|
|
@ -38,6 +41,4 @@ let
|
||||||
maybe = ./maybe.nix;
|
maybe = ./maybe.nix;
|
||||||
trapdoor = ./trapdoor.nix;
|
trapdoor = ./trapdoor.nix;
|
||||||
}
|
}
|
||||||
];
|
]
|
||||||
in
|
|
||||||
this
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
{this, ...}: let
|
{...}: let
|
||||||
inherit
|
inherit
|
||||||
(builtins)
|
(builtins)
|
||||||
attrNames
|
attrNames
|
||||||
|
|
@ -6,11 +6,6 @@
|
||||||
isAttrs
|
isAttrs
|
||||||
typeOf
|
typeOf
|
||||||
;
|
;
|
||||||
|
|
||||||
inherit
|
|
||||||
(this.std)
|
|
||||||
id
|
|
||||||
;
|
|
||||||
in rec {
|
in rec {
|
||||||
# NOTE: Maybe intentionally doesn't use the NixTypes.
|
# NOTE: Maybe intentionally doesn't use the NixTypes.
|
||||||
# NOTE: Maybe is used to aid in parsing and bootstrapping.
|
# NOTE: Maybe is used to aid in parsing and bootstrapping.
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
# WARNING: /nt/primitives/bootstrap cannot depend on mix
|
# WARNING: /nt/primitives/bootstrap cannot depend on mix
|
||||||
# WARNING: this file is strictly for bootstrapping nt
|
# WARNING: this file is strictly for bootstrapping nt
|
||||||
{bootstrap, ...} @ inputs:
|
{this, ...} @ inputs:
|
||||||
bootstrap inputs [
|
this.bootstrap inputs [
|
||||||
./parse.nix
|
./parse.nix
|
||||||
./sig.nix
|
./sig.nix
|
||||||
]
|
]
|
||||||
|
|
|
||||||
|
|
@ -1,14 +1,12 @@
|
||||||
# WARNING: /nt/primitives/bootstrap cannot depend on mix
|
# WARNING: /nt/primitives/bootstrap cannot depend on mix
|
||||||
# WARNING: this file is strictly for bootstrapping nt
|
# WARNING: this file is strictly for bootstrapping nt
|
||||||
{bootstrap, ...}: let
|
{this, ...}:
|
||||||
# WARNING: do not propagate `this` from parent, bootstrap/std must
|
# WARNING: do not propagate `this` from parent, bootstrap/std must
|
||||||
# WARNING: remain entirely independent from bootstrap
|
# WARNING: remain entirely independent from bootstrap/
|
||||||
this = bootstrap {inherit this bootstrap;} [
|
this.bootstrap {} [
|
||||||
./attrs.nix
|
./attrs.nix
|
||||||
./fn.nix
|
./fn.nix
|
||||||
./list.nix
|
./list.nix
|
||||||
./num.nix
|
./num.nix
|
||||||
./string.nix
|
./string.nix
|
||||||
];
|
]
|
||||||
in
|
|
||||||
this
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue