change how static is handled

This commit is contained in:
Jeff Hykin 2024-05-25 12:55:31 -04:00
parent 9e3062a5d8
commit e0f04630de
4 changed files with 34 additions and 3 deletions

View file

@ -4,11 +4,11 @@
* for new functions in `./tests.nix`. * for new functions in `./tests.nix`.
*/ */
let let
foundation = import ./detangled/1_foundation.nix; foundation = import ./detangled/1_foundation.nix;
fixedPoints = import ./detangled/2_fixed-points.nix; static = import ./detangled/2_static.nix;
fixedPoints = import ./detangled/3_fixed-points.nix;
in in
let let
static = foundation.loadStatic ../.;
untangledBase = { untangledBase = {
# constants # constants
sourceTypes = static.setup.sourceTypes; sourceTypes = static.setup.sourceTypes;

View file

@ -153,6 +153,18 @@ let
__functionArgs = args; __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 Print a warning before returning the second argument. This function behaves
like `builtins.trace`, but requires a string message and formats it as a like `builtins.trace`, but requires a string message and formats it as a

View 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 = "";
# };
# }