git submodule imports
Describe the bug
Using git submodules as imports in devenv.yaml results in an error.
To reproduce
- Create a git repository
- Add git submodules
git submodule add <BACKEND_URL> backend
git submodule add <FRONTEND_URL> frontend
- Run
devenv init - Change
devenv.yamlhttps://gist.github.com/bdj/8cceb2af38c6a6cde33148619984aaf2 - Run
devenv shell
Fails with the following output https://gist.github.com/bdj/6275dd3c7f9ed85e800c0d17638ce9c0
Version
devenv 1.0.1 (aarch64-darwin)
Is there anything new on this issue? Still there on devenv 1.3.1 (x86_64-linux)
Going to be addressed by #1548
https://github.com/cachix/devenv/pull/1928 adds support for inputs.self.submodules, but it's very broken, possibly because of lazy trees.
/nix/store/ma2fs2a60gz04xsgxkdxqhqxxvinwn5h-nix-devenv-2.30.0pre20250626_afa41b0/bin/nix --extra-experimental-features flakes --option lazy-trees true --option warn-dirty false --keep-going --max-jobs 8 --option eval-cache false print-dev-env --profile /home/domen/dev/cachix/devenv/.devenv/gc/shell -vv --log-format internal-json
@nix {"action":"msg","level":4,"msg":"evaluating file '<nix/derivation-internal.nix>'"}
@nix {"action":"start","id":5924662571696128,"level":4,"parent":0,"text":"evaluating derivation 'git+file:///home/domen/dev/cachix/devenv#devShells.x86_64-linux.default'","type":0}
@nix {"action":"msg","level":4,"msg":"evaluating file '/home/domen/dev/cachix/devenv/.devenv.flake.nix'"}
nix: ../canon-path.cc:56: nix::CanonPath nix::CanonPath::removePrefix(const nix::CanonPath&) const: Assertion `isWithin(prefix)' failed.
Aborted (core dumped)
Any news on this? It's a real show-stopper for my use case.
Currently, you can still add the repo of the submodule as input and then import it from there, as described in https://devenv.sh/composing-using-imports/. But of course I'd also love to see to import from the submodule directly! ❤️
We're going to fix this one soon :)