diff options
author | Naïm Favier <n@monade.li> | 2023-01-05 18:23:30 +0100 |
---|---|---|
committer | Naïm Favier <n@monade.li> | 2023-01-05 18:23:30 +0100 |
commit | f1ee4ece806d109df8f6994d9e70eb7f05505709 (patch) | |
tree | d5bd6d5eda1773ae8de5a73a1039ba7998bef911 /src | |
parent | d02c5a41da68908bd88d7a697abc52a04826894e (diff) |
Don't check NixOS modules
NixOS modules can be paths. Rather than dig further down into the layer
violation, don't check anything specific to NixOS modules.
Diffstat (limited to 'src')
-rw-r--r-- | src/nix/flake.cc | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/src/nix/flake.cc b/src/nix/flake.cc index 06fd87ef2..9b4cdf35a 100644 --- a/src/nix/flake.cc +++ b/src/nix/flake.cc @@ -381,23 +381,6 @@ struct CmdFlakeCheck : FlakeCommand auto checkModule = [&](const std::string & attrPath, Value & v, const PosIdx pos) { try { state->forceValue(v, pos); - if (v.isLambda()) { - if (!v.lambda.fun->hasFormals() || !v.lambda.fun->formals->ellipsis) - throw Error("module must match an open attribute set ('{ config, ... }')"); - } else if (v.type() == nAttrs) { - for (auto & attr : *v.attrs) - try { - state->forceValue(*attr.value, attr.pos); - } catch (Error & e) { - e.addTrace( - state->positions[attr.pos], - hintfmt("while evaluating the option '%s'", state->symbols[attr.name])); - throw; - } - } else - throw Error("module must be a function or an attribute set"); - // FIXME: if we have a 'nixpkgs' input, use it to - // check the module. } catch (Error & e) { e.addTrace(resolve(pos), hintfmt("while checking the NixOS module '%s'", attrPath)); reportError(e); |