You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have searched the issues of this repo and believe that this is not a duplicate.
Describe the bug
Environment variable POETRY_HOME is not the same as overridden pkgs.poetry build. This will cause problems when pkgs.python will be different than the python used by default for pkgs.poetry for specific nixpkgs. Meaning, even though poetry will be installed with correct python version, when using make install target it will use a different abspath to poetry and a different python interpreter. For example with pkgs.python310:
$ poetry env info
Virtualenv
Python: 3.10.4
Implementation: CPython
Path: NA
System
Platform: linux
OS: posix
Python: /nix/store/73jg56dr425ycv9p746arzf13m52q2n3-python3-3.10.4
$ echo$POETRY_HOME
/nix/store/p6n63a3jjcr6kxsyxllh1jqnqk03zbwy-python3.9-poetry-1.1.14
$ readlink -f $(which poetry)
/nix/store/w8nds4z9r8jadj74s5zjp9m28mns8ywv-python3.10-poetry-1.1.14/bin/poetry
$ make install
[install] Begin installing project.
...
...
$ poetry env info
Virtualenv
Python: 3.9.13
Implementation: CPython
Path: /home/rszamszur/repos/gh/rszamszur/fastapi-mvc/.venv
Valid: True
System
Platform: linux
OS: posix
Python: /nix/store/xpwwghl72bb7f48m51amvqiv1l25pa01-python3-3.9.13
Describe the bug
Environment variable
POETRY_HOME
is not the same as overriddenpkgs.poetry
build. This will cause problems whenpkgs.python
will be different than the python used by default forpkgs.poetry
for specificnixpkgs
. Meaning, even though poetry will be installed with correct python version, when usingmake install
target it will use a different abspath to poetry and a different python interpreter. For example withpkgs.python310
:The root cause:
https://github.com/rszamszur/fastapi-mvc/blob/ba351bb8a5e4ee7d8a1188aff301d38e04aeb932/shell.nix#L9-L12
Expected behavior
Environment variable
POETRY_HOME
should point to overriddenpkgs.poetry
build.To Reproduce
Use following nix shell expression:
Install the project via
make install
target. And runpoetry env info
.Environment
3.10.4
Linux hades 5.15.56 #1-NixOS SMP Thu Jul 21 19:24:44 UTC 2022 x86_64 GNU/Linux
0.14.0
Additional context
The text was updated successfully, but these errors were encountered: