cachix / devenv

Fast, Declarative, Reproducible, and Composable Developer Environments
https://devenv.sh
Apache License 2.0
4.07k stars 306 forks source link

Installing external Flakes partly broken since 1.1 #1456

Open Zaunei opened 3 days ago

Zaunei commented 3 days ago

Describe the bug

After upgrading devenv from version v1.0.8 to v1.1.0, devenv stopped working with my devenv.nix with the following error:

evaluating derivation 'git+file:///Users/Zaunei/repos/devenv-flake-import#devShells.aarch64-darwin.default'Assertion failed: (false), function operator(), file src/libexpr/primops.cc, line 76.

Since the error message was not informative for me, I started to remove parts of the config to find the cause.

It happens with some packages that are referenced by inputs, but not with all of them. I noticed it with flakes in private Git repos, but I found the sshuttle Flake with the same behavior, so I can offer a test repo to reproduce it. The sshuttle Flake is also very similar to mine. Installing colmena using the flake in devenv still works with 1.1.0.

Both flakes build without Devenv without any problems.

I am still quite new to Nix, maybe I am doing something wrong, but so far it has worked well and colmena is still working therefore I am opening a bug report.

To reproduce

Repository for reproduction: https://github.com/Zaunei/devenv-flake-import

Running devenv shell with devenv 1.0.x: works Running devenv shell with devenv 1.1.0 leads to the following error:

❯ devenv shell
• Building shell ...
• Using Cachix: devenv
evaluating derivation 'git+file:///Users/Zaunei/repos/devenv-flake-import#devShells.aarch64-darwin.default'Assertion failed: (false), function operator(), file src/libexpr/primops.cc, line 76.

✖ Command produced the following output:

✔ Building shell in 6.6s.
Error:   × Command `/nix/store/7n0ymzncvaj1rv98k7r0mr4rgagpqq1i-nix-2.24-devenv/bin/nix --show-trace --extra-experimental-features nix-command --extra-experimental-features flakes --option
  │ warn-dirty false --keep-going --max-jobs 5 --option eval-cache false print-dev-env --profile /Users/Zaunei/repos/devenv-flake-import/.devenv/gc/shell --option
  │ extra-substituters https://devenv.cachix.org --option extra-trusted-public-keys devenv.cachix.org-1:w1cLUi8dv3hnoSPGAuibQv+f9TZLr6cv/Hm9XgU50cw= nixpkgs-python.cachix.org-
  │ 1:hxjI7pFxTyuTHn2NkvWCrAUcNZLNS3ZAvfYNuYifcEU=` failed with without exit code

After removing sshuttle.sshuttle, devenv shell also works with devenv 1.1.0 again.

Version

devenv 1.1.0 (aarch64-darwin) installed with nix-darwin, but I was also able to reproduce it with a nix profiles installation. Also tested with NixOS 24.05, x86_64-linux.

Zaunei commented 2 days ago

I have just checked whether there is a general problem with Nix 2.24 with this Flake. But without devenv the build works for me with both, 2.18.5 and 2.24.6.