devenv icon indicating copy to clipboard operation
devenv copied to clipboard

stack trace after initializing devenv

Open DavHau opened this issue 3 years ago • 2 comments

Loaded devenv via flake (main branch), then:

dream2nix on  main [$] via ❄️  impure (dream2nix-devshell)
❯ rm -rf .envrc
direnv: unloading

dream2nix on  main [$✘]
❯ devenv init
Creating .envrc
Creating devenv.nix
Creating devenv.yaml
Appending .devenv* and devenv.local.nix to .gitignore
Done.
direnv: error /home/grmpf/synced/projects/github/dream2nix/.envrc is blocked. Run `direnv allow` to approve its content

dream2nix on  main [$!?]
❯ direnv allow
direnv: loading ~/synced/projects/github/dream2nix/.envrc
Building shell ...
[21.9/0.3 MiB DL] downloading 'https://github.com/NixOS/nixpkgs/archive/3a86856a13c88c8c64ea32082a851fefc79aa700.zip'direnv: ([/nix/store/a5kmn3sij0dlkxy5xxv7drs08k0qp267-direnv-2.31.0/bin/direnv export fish]) is taking a while to execute. Use CTRL-C to give up.
warning: creating lock file '/home/grmpf/synced/projects/github/dream2nix/devenv.lock'
deadnix 0.1.8
cachix 1.0.1
statix 0.5.6
vulnix 1.10.1
✨ devenv is out of date. Please update to 0.2: https://devenv.sh/getting-started/#installation
pre-commit-hooks.nix: updating /home/grmpf/synced/projects/github/dream2nix repo
pre-commit uninstalled
pre-commit installed at .git/hooks/pre-commit
hello from devenv
git version 2.38.1
direnv: export +AR +AS +CC +CONFIG_SHELL +CXX +DETERMINISTIC_BUILD +DEVENV_DOTFILE +DEVENV_ROOT +DEVENV_STATE +GREET +HOST_PATH +IN_NIX_SHELL +LD +NIX_BINTOOLS +NIX_BINTOOLS_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu +NIX_BUILD_CORES +NIX_BUILD_TOP +NIX_CC +NIX_CC_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu +NIX_CFLAGS_COMPILE +NIX_ENFORCE_NO_NATIVE +NIX_HARDENING_ENABLE +NIX_INDENT_MAKE +NIX_LDFLAGS +NIX_STORE +NM +OBJCOPY +OBJDUMP +PYTHONHASHSEED +PYTHONNOUSERSITE +PYTHONPATH +RANLIB +READELF +SIZE +SOURCE_DATE_EPOCH +STRINGS +STRIP +TEMP +TEMPDIR +TMP +TMPDIR +_PYTHON_HOST_PLATFORM +_PYTHON_SYSCONFIGDATA_NAME +buildInputs +buildPhase +builder +cmakeFlags +configureFlags +depsBuildBuild +depsBuildBuildPropagated +depsBuildTarget +depsBuildTargetPropagated +depsHostHost +depsHostHostPropagated +depsTargetTarget +depsTargetTargetPropagated +doCheck +doInstallCheck +dontAddDisableDepTrack +mesonFlags +name +nativeBuildInputs +out +outputs +patches +phases +propagatedBuildInputs +propagatedNativeBuildInputs +shell +shellHook +stdenv +strictDeps +system ~PATH ~XDG_DATA_DIRS

dream2nix on  main [$!?] via ❄️  impure (devenv)
❯ devenv --help
https://devenv.sh (version 0.2): Fast, Declarative, Reproducible, and Composable Developer Environments

Usage: devenv command [options] [arguments]

Commands:

init:           Scaffold devenv.yaml, devenv.nix, and .envrc inside the current directory.
init TARGET:    Scaffold devenv.yaml, devenv.nix, and .envrc inside TARGET directory.
search NAME:    Search packages matching NAME in nixpkgs input.
shell:          Activate the developer environment.
shell CMD ARGS: Run CMD with ARGS in the developer environment. Useful when scripting.
update:         Update devenv.lock from devenv.yaml inputs. See http://devenv.sh/inputs/#locking-and-updating-inputs
up:             Starts processes in foreground. See http://devenv.sh/processes
gc:             Removes old devenv generations. See http://devenv.sh/garbage-collection
ci:             builds your developer environment and make sure all checks pass.
version:        Display devenv version

direnv: loading ~/synced/projects/github/dream2nix/.envrc
Building shell ...
warning: applying 'toString' to path 'https://github.com/cachix/devenv/blob/3fe7cbae1d35c4075dac7e0fe58320cfdfa9861e/src/modules/pre-commit.nix' and then accessing it is deprecated, at «stdin»:0
warning: applying 'toString' to path 'https://github.com/cachix/pre-commit-hooks.nix/blob/b6bc0b21e1617e2b07d8205e7fae7224036dfa4b/modules/hooks.nix' and then accessing it is deprecated, at «stdin»:0
warning: applying 'toString' to path 'https://github.com/cachix/pre-commit-hooks.nix/blob/b6bc0b21e1617e2b07d8205e7fae7224036dfa4b/modules/pre-commit.nix' and then accessing it is deprecated, at «stdin»:0
warning: applying 'toString' to path 'https://github.com/cachix/pre-commit-hooks.nix/blob/b6bc0b21e1617e2b07d8205e7fae7224036dfa4b/modules/pre-commit.nix' and then accessing it is deprecated, at «stdin»:0
warning: applying 'toString' to path 'https://github.com/cachix/devenv/blob/3fe7cbae1d35c4075dac7e0fe58320cfdfa9861e/src/modules/pre-commit.nix' and then accessing it is deprecated, at «stdin»:0
error: file 'https://github.com/cachix/pre-commit-hooks.nix/blob/b6bc0b21e1617e2b07d8205e7fae7224036dfa4b/nix/call-tools.nix' does not exist

       … while evaluating the attribute 'value'

       at https://github.com/NixOS/nixpkgs/blob/3a86856a13c88c8c64ea32082a851fefc79aa700/lib/modules.nix:552:44:

          551|       defnsByName' = byName "config" (module: value:
          552|           [{ inherit (module) file; inherit value; }]
             |                                            ^
          553|         ) configs;

       … while evaluating 'dischargeProperties'

       at https://github.com/NixOS/nixpkgs/blob/3a86856a13c88c8c64ea32082a851fefc79aa700/lib/modules.nix:799:25:

          798|   */
          799|   dischargeProperties = def:
             |                         ^
          800|     if def._type or "" == "merge" then

       … from call site

       at https://github.com/NixOS/nixpkgs/blob/3a86856a13c88c8c64ea32082a851fefc79aa700/lib/modules.nix:728:137:

          727|         defs' = concatMap (m:
          728|           map (value: { inherit (m) file; inherit value; }) (builtins.addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value))
             |                                                                                                                                         ^
          729|         ) defs;

       … while evaluating definitions from `https://github.com/cachix/devenv/blob/3fe7cbae1d35c4075dac7e0fe58320cfdfa9861e/src/modules/pre-commit.nix':

       … while evaluating anonymous lambda

       at https://github.com/NixOS/nixpkgs/blob/3a86856a13c88c8c64ea32082a851fefc79aa700/lib/modules.nix:727:28:

          726|         # Process mkMerge and mkIf properties.
          727|         defs' = concatMap (m:
             |                            ^
          728|           map (value: { inherit (m) file; inherit value; }) (builtins.addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value))

       … from call site

       at https://github.com/NixOS/nixpkgs/blob/3a86856a13c88c8c64ea32082a851fefc79aa700/lib/modules.nix:727:17:

          726|         # Process mkMerge and mkIf properties.
          727|         defs' = concatMap (m:
             |                 ^
          728|           map (value: { inherit (m) file; inherit value; }) (builtins.addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value))

       … while evaluating the attribute 'values'

       at https://github.com/NixOS/nixpkgs/blob/3a86856a13c88c8c64ea32082a851fefc79aa700/lib/modules.nix:840:7:

          839|     in {
          840|       values = concatMap (def: if getPrio def == highestPrio then [(strip def)] else []) defs;
             |       ^
          841|       inherit highestPrio;

       … while evaluating the attribute 'values'

       at https://github.com/NixOS/nixpkgs/blob/3a86856a13c88c8c64ea32082a851fefc79aa700/lib/modules.nix:741:9:

          740|       in {
          741|         values = defs''';
             |         ^
          742|         inherit (defs'') highestPrio;

       … while evaluating the attribute 'mergedValue'

       at https://github.com/NixOS/nixpkgs/blob/3a86856a13c88c8c64ea32082a851fefc79aa700/lib/modules.nix:747:5:

          746|     # Type-check the remaining definitions, and merge them. Or throw if no definitions.
          747|     mergedValue =
             |     ^
          748|       if isDefined then

       … while evaluating the option `pre-commit.tools':

       … while evaluating the attribute 'value'

       at https://github.com/NixOS/nixpkgs/blob/3a86856a13c88c8c64ea32082a851fefc79aa700/lib/modules.nix:712:9:

          711|     in warnDeprecation opt //
          712|       { value = builtins.addErrorContext "while evaluating the option `${showOption loc}':" value;
             |         ^
          713|         inherit (res.defsFinal') highestPrio;

       … while evaluating anonymous lambda

       at https://github.com/NixOS/nixpkgs/blob/3a86856a13c88c8c64ea32082a851fefc79aa700/lib/modules.nix:265:72:

          264|           # For definitions that have an associated option
          265|           declaredConfig = mapAttrsRecursiveCond (v: ! isOption v) (_: v: v.value) options;
             |                                                                        ^
          266|

       … from call site

       at https://github.com/NixOS/nixpkgs/blob/3a86856a13c88c8c64ea32082a851fefc79aa700/lib/attrsets.nix:401:20:

          400|               then recurse (path ++ [name]) value
          401|               else f (path ++ [name]) value;
             |                    ^
          402|         in mapAttrs g;

       … while evaluating 'g'

       at https://github.com/NixOS/nixpkgs/blob/3a86856a13c88c8c64ea32082a851fefc79aa700/lib/attrsets.nix:398:19:

          397|           g =
          398|             name: value:
             |                   ^
          399|             if isAttrs value && cond value

       … while evaluating the attribute 'value'

       at https://github.com/NixOS/nixpkgs/blob/3a86856a13c88c8c64ea32082a851fefc79aa700/lib/modules.nix:552:44:

          551|       defnsByName' = byName "config" (module: value:
          552|           [{ inherit (module) file; inherit value; }]
             |                                            ^
          553|         ) configs;

       … while evaluating 'dischargeProperties'

       at https://github.com/NixOS/nixpkgs/blob/3a86856a13c88c8c64ea32082a851fefc79aa700/lib/modules.nix:799:25:

          798|   */
          799|   dischargeProperties = def:
             |                         ^
          800|     if def._type or "" == "merge" then

       … from call site

       at https://github.com/NixOS/nixpkgs/blob/3a86856a13c88c8c64ea32082a851fefc79aa700/lib/modules.nix:728:137:

          727|         defs' = concatMap (m:
          728|           map (value: { inherit (m) file; inherit value; }) (builtins.addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value))
             |                                                                                                                                         ^
          729|         ) defs;

       … while evaluating definitions from `https://github.com/cachix/pre-commit-hooks.nix/blob/b6bc0b21e1617e2b07d8205e7fae7224036dfa4b/modules/hooks.nix':

       … while evaluating anonymous lambda

       at https://github.com/NixOS/nixpkgs/blob/3a86856a13c88c8c64ea32082a851fefc79aa700/lib/modules.nix:727:28:

          726|         # Process mkMerge and mkIf properties.
          727|         defs' = concatMap (m:
             |                            ^
          728|           map (value: { inherit (m) file; inherit value; }) (builtins.addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value))

       … from call site

       at https://github.com/NixOS/nixpkgs/blob/3a86856a13c88c8c64ea32082a851fefc79aa700/lib/modules.nix:727:17:

          726|         # Process mkMerge and mkIf properties.
          727|         defs' = concatMap (m:
             |                 ^
          728|           map (value: { inherit (m) file; inherit value; }) (builtins.addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value))

       … while evaluating the attribute 'values'

       at https://github.com/NixOS/nixpkgs/blob/3a86856a13c88c8c64ea32082a851fefc79aa700/lib/modules.nix:840:7:

          839|     in {
          840|       values = concatMap (def: if getPrio def == highestPrio then [(strip def)] else []) defs;
             |       ^
          841|       inherit highestPrio;

       … while evaluating the attribute 'values'

       at https://github.com/NixOS/nixpkgs/blob/3a86856a13c88c8c64ea32082a851fefc79aa700/lib/modules.nix:741:9:

          740|       in {
          741|         values = defs''';
             |         ^
          742|         inherit (defs'') highestPrio;

       … while evaluating the attribute 'mergedValue'

       at https://github.com/NixOS/nixpkgs/blob/3a86856a13c88c8c64ea32082a851fefc79aa700/lib/modules.nix:747:5:

          746|     # Type-check the remaining definitions, and merge them. Or throw if no definitions.
          747|     mergedValue =
             |     ^
          748|       if isDefined then

       … while evaluating the option `pre-commit.hooks.shellcheck.entry':

       … while evaluating the attribute 'value'

       at https://github.com/NixOS/nixpkgs/blob/3a86856a13c88c8c64ea32082a851fefc79aa700/lib/modules.nix:712:9:

          711|     in warnDeprecation opt //
          712|       { value = builtins.addErrorContext "while evaluating the option `${showOption loc}':" value;
             |         ^
          713|         inherit (res.defsFinal') highestPrio;

       … while evaluating anonymous lambda

       at https://github.com/NixOS/nixpkgs/blob/3a86856a13c88c8c64ea32082a851fefc79aa700/lib/modules.nix:265:72:

          264|           # For definitions that have an associated option
          265|           declaredConfig = mapAttrsRecursiveCond (v: ! isOption v) (_: v: v.value) options;
             |                                                                        ^
          266|

       … from call site

       at https://github.com/NixOS/nixpkgs/blob/3a86856a13c88c8c64ea32082a851fefc79aa700/lib/attrsets.nix:401:20:

          400|               then recurse (path ++ [name]) value
          401|               else f (path ++ [name]) value;
             |                    ^
          402|         in mapAttrs g;

       … while evaluating 'g'

       at https://github.com/NixOS/nixpkgs/blob/3a86856a13c88c8c64ea32082a851fefc79aa700/lib/attrsets.nix:398:19:

          397|           g =
          398|             name: value:
             |                   ^
          399|             if isAttrs value && cond value

       … while evaluating the attribute 'value'

       at https://github.com/NixOS/nixpkgs/blob/3a86856a13c88c8c64ea32082a851fefc79aa700/lib/types.nix:526:60:

          525|           # Push down position info.
          526|           (map (def: mapAttrs (n: v: { inherit (def) file; value = v; }) def.value) defs)));
             |                                                            ^
          527|       emptyValue = { value = {}; };

       … while evaluating 'dischargeProperties'

       at https://github.com/NixOS/nixpkgs/blob/3a86856a13c88c8c64ea32082a851fefc79aa700/lib/modules.nix:799:25:

          798|   */
          799|   dischargeProperties = def:
             |                         ^
          800|     if def._type or "" == "merge" then

       … from call site

       at https://github.com/NixOS/nixpkgs/blob/3a86856a13c88c8c64ea32082a851fefc79aa700/lib/modules.nix:728:137:

          727|         defs' = concatMap (m:
          728|           map (value: { inherit (m) file; inherit value; }) (builtins.addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value))
             |                                                                                                                                         ^
          729|         ) defs;

       … while evaluating definitions from `https://github.com/cachix/pre-commit-hooks.nix/blob/b6bc0b21e1617e2b07d8205e7fae7224036dfa4b/modules/pre-commit.nix':

       … while evaluating anonymous lambda

       at https://github.com/NixOS/nixpkgs/blob/3a86856a13c88c8c64ea32082a851fefc79aa700/lib/modules.nix:727:28:

          726|         # Process mkMerge and mkIf properties.
          727|         defs' = concatMap (m:
             |                            ^
          728|           map (value: { inherit (m) file; inherit value; }) (builtins.addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value))

       … from call site

       at https://github.com/NixOS/nixpkgs/blob/3a86856a13c88c8c64ea32082a851fefc79aa700/lib/modules.nix:727:17:

          726|         # Process mkMerge and mkIf properties.
          727|         defs' = concatMap (m:
             |                 ^
          728|           map (value: { inherit (m) file; inherit value; }) (builtins.addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value))

       … while evaluating the attribute 'values'

       at https://github.com/NixOS/nixpkgs/blob/3a86856a13c88c8c64ea32082a851fefc79aa700/lib/modules.nix:840:7:

          839|     in {
          840|       values = concatMap (def: if getPrio def == highestPrio then [(strip def)] else []) defs;
             |       ^
          841|       inherit highestPrio;

       … while evaluating the attribute 'values'

       at https://github.com/NixOS/nixpkgs/blob/3a86856a13c88c8c64ea32082a851fefc79aa700/lib/modules.nix:741:9:

          740|       in {
          741|         values = defs''';
             |         ^
          742|         inherit (defs'') highestPrio;

       … while evaluating the attribute 'optionalValue'

       at https://github.com/NixOS/nixpkgs/blob/3a86856a13c88c8c64ea32082a851fefc79aa700/lib/modules.nix:759:5:

          758|
          759|     optionalValue =
             |     ^
          760|       if isDefined then { value = mergedValue; }

       … while evaluating anonymous lambda

       at https://github.com/NixOS/nixpkgs/blob/3a86856a13c88c8c64ea32082a851fefc79aa700/lib/types.nix:522:86:

          521|       merge = loc: defs:
          522|         mapAttrs (n: v: v.value) (filterAttrs (n: v: v ? value) (zipAttrsWith (name: defs:
             |                                                                                      ^
          523|             (mergeDefinitions (loc ++ [name]) elemType defs).optionalValue

       … while evaluating anonymous lambda

       at https://github.com/NixOS/nixpkgs/blob/3a86856a13c88c8c64ea32082a851fefc79aa700/lib/types.nix:522:51:

          521|       merge = loc: defs:
          522|         mapAttrs (n: v: v.value) (filterAttrs (n: v: v ? value) (zipAttrsWith (name: defs:
             |                                                   ^
          523|             (mergeDefinitions (loc ++ [name]) elemType defs).optionalValue

       … from call site

       at https://github.com/NixOS/nixpkgs/blob/3a86856a13c88c8c64ea32082a851fefc79aa700/lib/attrsets.nix:225:62:

          224|   filterAttrs = pred: set:
          225|     listToAttrs (concatMap (name: let v = set.${name}; in if pred name v then [(nameValuePair name v)] else []) (attrNames set));
             |                                                              ^
          226|

       … while evaluating anonymous lambda

       at https://github.com/NixOS/nixpkgs/blob/3a86856a13c88c8c64ea32082a851fefc79aa700/lib/attrsets.nix:225:29:

          224|   filterAttrs = pred: set:
          225|     listToAttrs (concatMap (name: let v = set.${name}; in if pred name v then [(nameValuePair name v)] else []) (attrNames set));
             |                             ^
          226|

       … from call site

       at https://github.com/NixOS/nixpkgs/blob/3a86856a13c88c8c64ea32082a851fefc79aa700/lib/attrsets.nix:225:18:

          224|   filterAttrs = pred: set:
          225|     listToAttrs (concatMap (name: let v = set.${name}; in if pred name v then [(nameValuePair name v)] else []) (attrNames set));
             |                  ^
          226|

       … while evaluating 'filterAttrs'

       at https://github.com/NixOS/nixpkgs/blob/3a86856a13c88c8c64ea32082a851fefc79aa700/lib/attrsets.nix:224:23:

          223|   */
          224|   filterAttrs = pred: set:
             |                       ^
          225|     listToAttrs (concatMap (name: let v = set.${name}; in if pred name v then [(nameValuePair name v)] else []) (attrNames set));

       … from call site

       at https://github.com/NixOS/nixpkgs/blob/3a86856a13c88c8c64ea32082a851fefc79aa700/lib/types.nix:522:35:

          521|       merge = loc: defs:
          522|         mapAttrs (n: v: v.value) (filterAttrs (n: v: v ? value) (zipAttrsWith (name: defs:
             |                                   ^
          523|             (mergeDefinitions (loc ++ [name]) elemType defs).optionalValue

       … while evaluating 'merge'

       at https://github.com/NixOS/nixpkgs/blob/3a86856a13c88c8c64ea32082a851fefc79aa700/lib/types.nix:521:20:

          520|       check = isAttrs;
          521|       merge = loc: defs:
             |                    ^
          522|         mapAttrs (n: v: v.value) (filterAttrs (n: v: v ? value) (zipAttrsWith (name: defs:

       … from call site

       at https://github.com/NixOS/nixpkgs/blob/3a86856a13c88c8c64ea32082a851fefc79aa700/lib/modules.nix:749:59:

          748|       if isDefined then
          749|         if all (def: type.check def.value) defsFinal then type.merge loc defsFinal
             |                                                           ^
          750|         else let allInvalid = filter (def: ! type.check def.value) defsFinal;

       … while evaluating the attribute 'mergedValue'

       at https://github.com/NixOS/nixpkgs/blob/3a86856a13c88c8c64ea32082a851fefc79aa700/lib/modules.nix:747:5:

          746|     # Type-check the remaining definitions, and merge them. Or throw if no definitions.
          747|     mergedValue =
             |     ^
          748|       if isDefined then

       … while evaluating the option `pre-commit.hooks.shellcheck.raw':

       … while evaluating the attribute 'value'

       at https://github.com/NixOS/nixpkgs/blob/3a86856a13c88c8c64ea32082a851fefc79aa700/lib/modules.nix:712:9:

          711|     in warnDeprecation opt //
          712|       { value = builtins.addErrorContext "while evaluating the option `${showOption loc}':" value;
             |         ^
          713|         inherit (res.defsFinal') highestPrio;

       … while evaluating anonymous lambda

       at https://github.com/NixOS/nixpkgs/blob/3a86856a13c88c8c64ea32082a851fefc79aa700/lib/modules.nix:265:72:

          264|           # For definitions that have an associated option
          265|           declaredConfig = mapAttrsRecursiveCond (v: ! isOption v) (_: v: v.value) options;
             |                                                                        ^
          266|

       … from call site

       at https://github.com/NixOS/nixpkgs/blob/3a86856a13c88c8c64ea32082a851fefc79aa700/lib/attrsets.nix:401:20:

          400|               then recurse (path ++ [name]) value
          401|               else f (path ++ [name]) value;
             |                    ^
          402|         in mapAttrs g;

       … while evaluating 'g'

       at https://github.com/NixOS/nixpkgs/blob/3a86856a13c88c8c64ea32082a851fefc79aa700/lib/attrsets.nix:398:19:

          397|           g =
          398|             name: value:
             |                   ^
          399|             if isAttrs value && cond value

       … while evaluating anonymous lambda

       at https://github.com/cachix/pre-commit-hooks.nix/blob/b6bc0b21e1617e2b07d8205e7fae7224036dfa4b/modules/pre-commit.nix:146:25:

          145|   processedHooks =
          146|     mapAttrsToList (id: value: value.raw // { inherit id; }) enabledHooks;
             |                         ^
          147|

       … from call site

       at https://github.com/NixOS/nixpkgs/blob/3a86856a13c88c8c64ea32082a851fefc79aa700/lib/attrsets.nix:356:16:

          355|   mapAttrsToList = f: attrs:
          356|     map (name: f name attrs.${name}) (attrNames attrs);
             |                ^
          357|

       … while evaluating anonymous lambda

       at https://github.com/NixOS/nixpkgs/blob/3a86856a13c88c8c64ea32082a851fefc79aa700/lib/attrsets.nix:356:10:

          355|   mapAttrsToList = f: attrs:
          356|     map (name: f name attrs.${name}) (attrNames attrs);
             |          ^
          357|

       … while evaluating the attribute 'rawJSON' of the derivation 'pre-commit-config.json'

       at https://github.com/NixOS/nixpkgs/blob/3a86856a13c88c8c64ea32082a851fefc79aa700/pkgs/stdenv/generic/make-derivation.nix:270:7:

          269|     // (lib.optionalAttrs (attrs ? name || (attrs ? pname && attrs ? version)) {
          270|       name =
             |       ^
          271|         let

       … while evaluating the attribute 'value'

       at https://github.com/NixOS/nixpkgs/blob/3a86856a13c88c8c64ea32082a851fefc79aa700/lib/modules.nix:552:44:

          551|       defnsByName' = byName "config" (module: value:
          552|           [{ inherit (module) file; inherit value; }]
             |                                            ^
          553|         ) configs;

       … while evaluating 'dischargeProperties'

       at https://github.com/NixOS/nixpkgs/blob/3a86856a13c88c8c64ea32082a851fefc79aa700/lib/modules.nix:799:25:

          798|   */
          799|   dischargeProperties = def:
             |                         ^
          800|     if def._type or "" == "merge" then

       … from call site

       at https://github.com/NixOS/nixpkgs/blob/3a86856a13c88c8c64ea32082a851fefc79aa700/lib/modules.nix:728:137:

          727|         defs' = concatMap (m:
          728|           map (value: { inherit (m) file; inherit value; }) (builtins.addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value))
             |                                                                                                                                         ^
          729|         ) defs;

       … while evaluating definitions from `https://github.com/cachix/pre-commit-hooks.nix/blob/b6bc0b21e1617e2b07d8205e7fae7224036dfa4b/modules/pre-commit.nix':

       … while evaluating anonymous lambda

       at https://github.com/NixOS/nixpkgs/blob/3a86856a13c88c8c64ea32082a851fefc79aa700/lib/modules.nix:727:28:

          726|         # Process mkMerge and mkIf properties.
          727|         defs' = concatMap (m:
             |                            ^
          728|           map (value: { inherit (m) file; inherit value; }) (builtins.addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value))

       … from call site

       at https://github.com/NixOS/nixpkgs/blob/3a86856a13c88c8c64ea32082a851fefc79aa700/lib/modules.nix:727:17:

          726|         # Process mkMerge and mkIf properties.
          727|         defs' = concatMap (m:
             |                 ^
          728|           map (value: { inherit (m) file; inherit value; }) (builtins.addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value))

       … while evaluating the attribute 'values'

       at https://github.com/NixOS/nixpkgs/blob/3a86856a13c88c8c64ea32082a851fefc79aa700/lib/modules.nix:840:7:

          839|     in {
          840|       values = concatMap (def: if getPrio def == highestPrio then [(strip def)] else []) defs;
             |       ^
          841|       inherit highestPrio;

       … while evaluating the attribute 'values'

       at https://github.com/NixOS/nixpkgs/blob/3a86856a13c88c8c64ea32082a851fefc79aa700/lib/modules.nix:741:9:

          740|       in {
          741|         values = defs''';
             |         ^
          742|         inherit (defs'') highestPrio;

       … while evaluating the attribute 'mergedValue'

       at https://github.com/NixOS/nixpkgs/blob/3a86856a13c88c8c64ea32082a851fefc79aa700/lib/modules.nix:747:5:

          746|     # Type-check the remaining definitions, and merge them. Or throw if no definitions.
          747|     mergedValue =
             |     ^
          748|       if isDefined then

       … while evaluating the option `pre-commit.installationScript':

       … while evaluating the attribute 'value'

       at https://github.com/NixOS/nixpkgs/blob/3a86856a13c88c8c64ea32082a851fefc79aa700/lib/modules.nix:712:9:

          711|     in warnDeprecation opt //
          712|       { value = builtins.addErrorContext "while evaluating the option `${showOption loc}':" value;
             |         ^
          713|         inherit (res.defsFinal') highestPrio;

       … while evaluating anonymous lambda

       at https://github.com/NixOS/nixpkgs/blob/3a86856a13c88c8c64ea32082a851fefc79aa700/lib/modules.nix:265:72:

          264|           # For definitions that have an associated option
          265|           declaredConfig = mapAttrsRecursiveCond (v: ! isOption v) (_: v: v.value) options;
             |                                                                        ^
          266|

       … from call site

       at https://github.com/NixOS/nixpkgs/blob/3a86856a13c88c8c64ea32082a851fefc79aa700/lib/attrsets.nix:401:20:

          400|               then recurse (path ++ [name]) value
          401|               else f (path ++ [name]) value;
             |                    ^
          402|         in mapAttrs g;

       … while evaluating 'g'

       at https://github.com/NixOS/nixpkgs/blob/3a86856a13c88c8c64ea32082a851fefc79aa700/lib/attrsets.nix:398:19:

          397|           g =
          398|             name: value:
             |                   ^
          399|             if isAttrs value && cond value

       … while evaluating the attribute 'content'

       at https://github.com/NixOS/nixpkgs/blob/3a86856a13c88c8c64ea32082a851fefc79aa700/lib/modules.nix:870:14:

          869|     { _type = "if";
          870|       inherit condition content;
             |              ^
          871|     };

       … while evaluating 'dischargeProperties'

       at https://github.com/NixOS/nixpkgs/blob/3a86856a13c88c8c64ea32082a851fefc79aa700/lib/modules.nix:799:25:

          798|   */
          799|   dischargeProperties = def:
             |                         ^
          800|     if def._type or "" == "merge" then

       … from call site

       at https://github.com/NixOS/nixpkgs/blob/3a86856a13c88c8c64ea32082a851fefc79aa700/lib/modules.nix:805:11:

          804|         if def.condition then
          805|           dischargeProperties def.content
             |           ^
          806|         else

       … while evaluating 'dischargeProperties'

       at https://github.com/NixOS/nixpkgs/blob/3a86856a13c88c8c64ea32082a851fefc79aa700/lib/modules.nix:799:25:

          798|   */
          799|   dischargeProperties = def:
             |                         ^
          800|     if def._type or "" == "merge" then

       … from call site

       at https://github.com/NixOS/nixpkgs/blob/3a86856a13c88c8c64ea32082a851fefc79aa700/lib/modules.nix:728:137:

          727|         defs' = concatMap (m:
          728|           map (value: { inherit (m) file; inherit value; }) (builtins.addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value))
             |                                                                                                                                         ^
          729|         ) defs;

       … while evaluating definitions from `https://github.com/cachix/devenv/blob/3fe7cbae1d35c4075dac7e0fe58320cfdfa9861e/src/modules/pre-commit.nix':

       … while evaluating anonymous lambda

       at https://github.com/NixOS/nixpkgs/blob/3a86856a13c88c8c64ea32082a851fefc79aa700/lib/modules.nix:727:28:

          726|         # Process mkMerge and mkIf properties.
          727|         defs' = concatMap (m:
             |                            ^
          728|           map (value: { inherit (m) file; inherit value; }) (builtins.addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value))

       … from call site

       at https://github.com/NixOS/nixpkgs/blob/3a86856a13c88c8c64ea32082a851fefc79aa700/lib/modules.nix:727:17:

          726|         # Process mkMerge and mkIf properties.
          727|         defs' = concatMap (m:
             |                 ^
          728|           map (value: { inherit (m) file; inherit value; }) (builtins.addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value))

       … while evaluating the attribute 'values'

       at https://github.com/NixOS/nixpkgs/blob/3a86856a13c88c8c64ea32082a851fefc79aa700/lib/modules.nix:840:7:

          839|     in {
          840|       values = concatMap (def: if getPrio def == highestPrio then [(strip def)] else []) defs;
             |       ^
          841|       inherit highestPrio;

       … while evaluating the attribute 'values'

       at https://github.com/NixOS/nixpkgs/blob/3a86856a13c88c8c64ea32082a851fefc79aa700/lib/modules.nix:741:9:

          740|       in {
          741|         values = defs''';
             |         ^
          742|         inherit (defs'') highestPrio;

       … while evaluating the attribute 'mergedValue'

       at https://github.com/NixOS/nixpkgs/blob/3a86856a13c88c8c64ea32082a851fefc79aa700/lib/modules.nix:747:5:

          746|     # Type-check the remaining definitions, and merge them. Or throw if no definitions.
          747|     mergedValue =
             |     ^
          748|       if isDefined then

       … while evaluating the option `enterShell':

       … while evaluating the attribute 'value'

       at https://github.com/NixOS/nixpkgs/blob/3a86856a13c88c8c64ea32082a851fefc79aa700/lib/modules.nix:712:9:

          711|     in warnDeprecation opt //
          712|       { value = builtins.addErrorContext "while evaluating the option `${showOption loc}':" value;
             |         ^
          713|         inherit (res.defsFinal') highestPrio;

       … while evaluating anonymous lambda

       at https://github.com/NixOS/nixpkgs/blob/3a86856a13c88c8c64ea32082a851fefc79aa700/lib/modules.nix:265:72:

          264|           # For definitions that have an associated option
          265|           declaredConfig = mapAttrsRecursiveCond (v: ! isOption v) (_: v: v.value) options;
             |                                                                        ^
          266|

       … from call site

       at https://github.com/NixOS/nixpkgs/blob/3a86856a13c88c8c64ea32082a851fefc79aa700/lib/attrsets.nix:401:20:

          400|               then recurse (path ++ [name]) value
          401|               else f (path ++ [name]) value;
             |                    ^
          402|         in mapAttrs g;

       … while evaluating 'g'

       at https://github.com/NixOS/nixpkgs/blob/3a86856a13c88c8c64ea32082a851fefc79aa700/lib/attrsets.nix:398:19:

          397|           g =
          398|             name: value:
             |                   ^
          399|             if isAttrs value && cond value

       … while evaluating the attribute 'shellHook' of the derivation 'devenv'

       at https://github.com/NixOS/nixpkgs/blob/3a86856a13c88c8c64ea32082a851fefc79aa700/pkgs/stdenv/generic/make-derivation.nix:270:7:

          269|     // (lib.optionalAttrs (attrs ? name || (attrs ? pname && attrs ? version)) {
          270|       name =
             |       ^
          271|         let

DavHau avatar Nov 17 '22 13:11 DavHau

I can't reproduce this locally, can you share your devenv.lock?

If you upgrade to just released 0.3 does it still happen?

domenkozar avatar Nov 17 '22 13:11 domenkozar

Still the same with 0.3. I just found out this problem happens only in the dream2nix repo. If I create a fresh git repo and initialize devenv there, it seems to work. Here the devenv.lock:

{
  "nodes": {
    "devenv": {
      "locked": {
        "dir": "src/modules",
        "lastModified": 1668691875,
        "narHash": "sha256-D/hFlhGe1rfG04Si79fs1J3K4h9f2tWKpuvPYxPci78=",
        "owner": "cachix",
        "repo": "devenv",
        "rev": "3fe7cbae1d35c4075dac7e0fe58320cfdfa9861e",
        "type": "github"
      },
      "original": {
        "dir": "src/modules",
        "owner": "cachix",
        "repo": "devenv",
        "type": "github"
      }
    },
    "flake-utils": {
      "locked": {
        "lastModified": 1667395993,
        "narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=",
        "owner": "numtide",
        "repo": "flake-utils",
        "rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f",
        "type": "github"
      },
      "original": {
        "owner": "numtide",
        "repo": "flake-utils",
        "type": "github"
      }
    },
    "nixpkgs": {
      "locked": {
        "lastModified": 1668650906,
        "narHash": "sha256-JuiYfDO23O8oxUUOmhQflmOoJovyC5G4RjcYQMQjrRE=",
        "owner": "NixOS",
        "repo": "nixpkgs",
        "rev": "3a86856a13c88c8c64ea32082a851fefc79aa700",
        "type": "github"
      },
      "original": {
        "owner": "NixOS",
        "ref": "nixpkgs-unstable",
        "repo": "nixpkgs",
        "type": "github"
      }
    },
    "pre-commit-hooks": {
      "inputs": {
        "flake-utils": "flake-utils",
        "nixpkgs": [
          "nixpkgs"
        ]
      },
      "locked": {
        "lastModified": 1646153636,
        "narHash": "sha256-AlWHMzK+xJ1mG267FdT8dCq/HvLCA6jwmx2ZUy5O8tY=",
        "owner": "cachix",
        "repo": "pre-commit-hooks.nix",
        "rev": "b6bc0b21e1617e2b07d8205e7fae7224036dfa4b",
        "type": "github"
      },
      "original": {
        "owner": "cachix",
        "repo": "pre-commit-hooks.nix",
        "type": "github"
      }
    },
    "root": {
      "inputs": {
        "devenv": "devenv",
        "nixpkgs": "nixpkgs",
        "pre-commit-hooks": "pre-commit-hooks"
      }
    }
  },
  "root": "root",
  "version": 7
}

DavHau avatar Nov 17 '22 14:11 DavHau

This was a bug in pre-commit-hooks and was fixed shortly after.

domenkozar avatar Dec 12 '22 09:12 domenkozar