Open mrfelton opened 3 weeks ago
It should also warn you that pyproject.toml
is missing, which is a sign that we're working from the top-level directory.
The module is designed to work from the top-level directory. Composing devenv
s like this is tricky, because Nix doesn't have a reliable way of letting us know where an option is defined, e.g. mkdocs/devenv.nix
. If we add an option to specify the working directory for the python project, then only one of the devenv's will work, which brings us back full circle.
Best I came up with so far is adding an alias to the binaries that I want to share into the top level devenv:
e.g.
# scripts.mkdocs.exec = lib.mkForce "$DEVENV_ROOT/devenv/mkdocs/.venv/bin/mkdocs $@";
Kinda janky, but sorta works.
Describe the bug
I have a composable devenv like so:
In the top level
devenv.yaml
I have something like this:In the
./devenv/mkdocs/devenv.nix
I set up a python env:with
./devenv/mkdocs/pyproject.toml
like so (truncated for brevity):From directly within the
devenv/mkdocs
devenv I can usepython
and I can use the packages installed by poetry, egmkdocs
.Problem: From the top level devenv (which imports the mkdocs one) I can use the
python
binary, but not the ones installed by poetry such asmkdocs
.Expectation: I expect to be be able to use the things installed from the imported devenvs poetry venv
Version