Open willruggiano opened 1 year ago
Here is the full trace:
❯ nix flake check --show-trace
error:
… while checking flake output 'packages'
at «none»:0: (source not available)
… while checking the derivation 'packages.x86_64-linux.container-'
at «none»:0: (source not available)
… while calling anonymous lambda
at /nix/store/7m0y4s8bd0pj7mazwdxrwa2m14hplims-source/lib/types.nix:546:29:
545| merge = loc: defs:
546| zipAttrsWith (name: defs:
| ^
547| let merged = mergeDefinitions (loc ++ [name]) elemType defs;
… while calling anonymous lambda
at /nix/store/7m0y4s8bd0pj7mazwdxrwa2m14hplims-source/lib/modules.nix:738:28:
737| # Process mkMerge and mkIf properties.
738| defs' = concatMap (m:
| ^
739| map (value: { inherit (m) file; inherit value; }) (builtins.addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value))
… while evaluating definitions from `/nix/store/fgq96ksc454xjys9bh0hb9lwnybvqsw7-source/modules/transposition.nix':
… from call site
at /nix/store/7m0y4s8bd0pj7mazwdxrwa2m14hplims-source/lib/modules.nix:739:137:
738| defs' = concatMap (m:
739| map (value: { inherit (m) file; inherit value; }) (builtins.addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value))
| ^
740| ) defs;
… while calling 'dischargeProperties'
at /nix/store/7m0y4s8bd0pj7mazwdxrwa2m14hplims-source/lib/modules.nix:810:25:
809| */
810| dischargeProperties = def:
| ^
811| if def._type or "" == "merge" then
… while calling anonymous lambda
at /nix/store/7m0y4s8bd0pj7mazwdxrwa2m14hplims-source/lib/types.nix:546:29:
545| merge = loc: defs:
546| zipAttrsWith (name: defs:
| ^
547| let merged = mergeDefinitions (loc ++ [name]) elemType defs;
… while calling anonymous lambda
at /nix/store/7m0y4s8bd0pj7mazwdxrwa2m14hplims-source/lib/modules.nix:738:28:
737| # Process mkMerge and mkIf properties.
738| defs' = concatMap (m:
| ^
739| map (value: { inherit (m) file; inherit value; }) (builtins.addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value))
… while evaluating definitions from `/nix/store/xp2cwi9fissm20h670la3cybffdvx3ai-source/flake-module.nix':
… from call site
at /nix/store/7m0y4s8bd0pj7mazwdxrwa2m14hplims-source/lib/modules.nix:739:137:
738| defs' = concatMap (m:
739| map (value: { inherit (m) file; inherit value; }) (builtins.addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value))
| ^
740| ) defs;
… while calling 'dischargeProperties'
at /nix/store/7m0y4s8bd0pj7mazwdxrwa2m14hplims-source/lib/modules.nix:810:25:
809| */
810| dischargeProperties = def:
| ^
811| if def._type or "" == "merge" then
… while calling 'g'
at /nix/store/m57a8xcfd0c0l7gln4gngqgx0nk04arh-source/lib/attrsets.nix:535:19:
534| g =
535| name: value:
| ^
536| if isAttrs value && cond value
… from call site
at /nix/store/m57a8xcfd0c0l7gln4gngqgx0nk04arh-source/lib/attrsets.nix:538:20:
537| then recurse (path ++ [name]) value
538| else f (path ++ [name]) value;
| ^
539| in mapAttrs g;
… while calling anonymous lambda
at /nix/store/m57a8xcfd0c0l7gln4gngqgx0nk04arh-source/lib/modules.nix:270:72:
269| # For definitions that have an associated option
270| declaredConfig = mapAttrsRecursiveCond (v: ! isOption v) (_: v: v.value) options;
| ^
271|
… while evaluating the option `perSystem.x86_64-linux.devenv.shells.default.containers."".derivation':
… while calling anonymous lambda
at /nix/store/m57a8xcfd0c0l7gln4gngqgx0nk04arh-source/lib/modules.nix:753:19:
752| # Avoid sorting if we don't have to.
753| if any (def: def.value._type or "" == "order") defs''.values
| ^
754| then sortProperties defs''.values
… from call site
at /nix/store/xp2cwi9fissm20h670la3cybffdvx3ai-source/src/modules/containers.nix:143:19:
142| internal = true;
143| default = mkDerivation config;
| ^
144| };
… while calling 'mkDerivation'
at /nix/store/xp2cwi9fissm20h670la3cybffdvx3ai-source/src/modules/containers.nix:35:18:
34| '';
35| mkDerivation = cfg: nix2container.nix2container.buildImage {
| ^
36| name = cfg.name;
error: To build the container, you need to add the following to your devenv.yaml:
inputs:
nix2container:
url: github:nlewo/nix2container
inputs:
nixpkgs:
follows: nixpkgs
mk-shell-bin:
url: github:rrbutani/nix-mk-shell-bin
Same issue, but adding nix2container.url = "github:nlewo/nix2container";
to inputs doesn't make error go away
I figured out that devenv.shells.<name>.containers = lib.mkForce {};
removes error
And
nix2container = {
url = "github:nlewo/nix2container";
inputs.nixpkgs.follows = "nixpkgs";
};
mk-shell-bin.url = "github:rrbutani/nix-mk-shell-bin";
also
Describe the bug When running
nix flake show
andnix flake check
, I get the following error:Similarly for
nix flake show
:To Reproduce See this flake.nix. It's clearly a very simple usage. The error goes away if I add nix2container to my flake's inputs, but I don't think that should be a requirement if I do not define any dev containers?
Version
https://github.com/willruggiano/neovim.drv/blob/236d94ff0502bd89699021b4d9911bb932f6aa24/flake.lock#L10-L16