change how static is handled
This commit is contained in:
parent
9e3062a5d8
commit
e0f04630de
|
@ -4,11 +4,11 @@
|
|||
* for new functions in `./tests.nix`.
|
||||
*/
|
||||
let
|
||||
foundation = import ./detangled/1_foundation.nix;
|
||||
fixedPoints = import ./detangled/2_fixed-points.nix;
|
||||
foundation = import ./detangled/1_foundation.nix;
|
||||
static = import ./detangled/2_static.nix;
|
||||
fixedPoints = import ./detangled/3_fixed-points.nix;
|
||||
in
|
||||
let
|
||||
static = foundation.loadStatic ../.;
|
||||
untangledBase = {
|
||||
# constants
|
||||
sourceTypes = static.setup.sourceTypes;
|
||||
|
|
|
@ -153,6 +153,18 @@ let
|
|||
__functionArgs = args;
|
||||
};
|
||||
|
||||
# See https://github.com/NixOS/nix/issues/749. Eventually we'd like these
|
||||
# to expand to Nix builtins that carry metadata so that Nix can filter out
|
||||
# the INFO messages without parsing the message string.
|
||||
#
|
||||
# Usage:
|
||||
# {
|
||||
# foo = lib.warn "foo is deprecated" oldFoo;
|
||||
# bar = lib.warnIf (bar == "") "Empty bar is deprecated" bar;
|
||||
# }
|
||||
#
|
||||
# TODO: figure out a clever way to integrate location information from
|
||||
# something like __unsafeGetAttrPos.
|
||||
/**
|
||||
Print a warning before returning the second argument. This function behaves
|
||||
like `builtins.trace`, but requires a string message and formats it as a
|
||||
|
|
19
nodes/1_lib/source/detangled/2_static.nix
Normal file
19
nodes/1_lib/source/detangled/2_static.nix
Normal file
|
@ -0,0 +1,19 @@
|
|||
let # internal lib dependencies
|
||||
foundation = import ./1_foundation.nix;
|
||||
in
|
||||
# e.g. the root of the node
|
||||
foundation.loadStatic ../../.
|
||||
# will end up being an object like this:
|
||||
# {
|
||||
# setup = {
|
||||
# release = "";
|
||||
# sourceTypes = { ...};
|
||||
# licenses = { ... };
|
||||
# maintainers = [ ... ];
|
||||
# teams = { ... };
|
||||
# };
|
||||
# meta = {
|
||||
# minNixVersion = "2.3";
|
||||
# generatedBy = "";
|
||||
# };
|
||||
# }
|
Loading…
Reference in a new issue