devenv: Environment Setup Fails Due to Missing .devenv.flake.nix after devenv update

Describe the bug I had a working devenv with an overlay for foundry, but it started failing once I did devenv update (from 0.6.3 to 1.0.3).

The process fails due to an error related to missing files and possible path issues. The specific error message indicates that the .devenv.flake.nix file cannot be found (despite it being there), leading to a failure in loading the environment. Here’s the specific part of the error log that highlights the issue:

direnv: loading ~/devenv/foundry-devenv/.envrc
direnv: loading https://raw.githubusercontent.com/cachix/devenv/d1f7b48e35e6dee421cfd0f51481d17f77586997/direnvrc
direnv: using devenv
error: opening file '/nix/store/0n86420hx4bydkpx8q7a4vqw46f5ihhp-source/.devenv.flake.nix': No such file or directory
...
...
direnv: loading the environment failed
direnv: error exit status 1
.rw-r--r--  5.1k getse 17 Apr 11:13  ├── .devenv.flake.nix
drwxr-xr-x     - getse 21 Aug  2023  ├── .direnv
.rw-r--r--   185 getse 17 Apr 11:09  ├── .envrc
drwxr-xr-x     - getse 17 Apr 11:12  ├── .git
drwxr-xr-x     - getse 21 Aug  2023  │  ├── branches
.rw-r--r--    14 getse 15 Apr 16:48  │  ├── COMMIT_EDITMSG
.rw-r--r--   266 getse 21 Aug  2023  │  ├── config
.rw-r--r--    73 getse 21 Aug  2023  │  ├── description
.rw-r--r--    97 getse 21 Aug  2023  │  ├── FETCH_HEAD
.rw-r--r--    21 getse 21 Aug  2023  │  ├── HEAD
drwxr-xr-x     - getse 21 Aug  2023  │  ├── hooks
.rw-r--r--  2.7k getse 17 Apr 11:12  │  ├── index
drwxr-xr-x     - getse 21 Aug  2023  │  ├── info
drwxr-xr-x     - getse 21 Aug  2023  │  ├── logs
drwxr-xr-x     - getse 15 Apr 16:48  │  ├── objects
.rw-r--r--    41 getse 21 Aug  2023  │  ├── ORIG_HEAD
drwxr-xr-x     - getse 21 Aug  2023  │  └── refs
.rw-r--r--    53 getse 21 Aug  2023  ├── .gitignore
.rw-r--r--  8.9k getse 17 Apr 11:12  ├── devenv.lock
.rw-r--r--  2.0k getse 21 Aug  2023  ├── devenv.nix
.rw-r--r--   281 getse 21 Aug  2023  ├── devenv.yaml
drwxr-xr-x     - getse 21 Aug  2023  ├── foundry-overlay
.rw-r--r--  2.8k getse 21 Aug  2023  │  ├── flake.lock
.rw-r--r--   225 getse 21 Aug  2023  │  └── flake.nix
.rw-r--r--   11k getse 21 Aug  2023  ├── LICENSE
.rw-r--r--   781 getse 21 Aug  2023  ├── README.md

To reproduce

Please find the necessary files (devenv.nix, devenv.yaml, and devenv.lock) and the complete error logs in this https://gist.github.com/gonzaloetjo/41b62b2a97387b8b8029ba3c2fdd5d8c.

Expected behavior The environment should load without errors, sourcing all necessary Nix packages and configurations. Previously, this setup loaded correctly without any issues.

Version

$ devenv version
1.0.3

Previously, this configuration was working with version 0.6.3.

The repository for the current environment setup is found here.

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 28 (26 by maintainers)

Commits related to this issue

Most upvoted comments

This is on the top of my priority list of next week.

I have the same issue with git+ssh:// inputs. Adding flake: false works.

Testing a fix in #1137

This is fixed in 1.7.0!