mirror of
https://github.com/vale981/poetry2nix
synced 2025-03-04 16:51:40 -05:00
Prevent editable package from being built when in nix-shell environment
They are not useful and will will fail to build in some cases, like the case where they depend on another package also being added as an editable source.
This commit is contained in:
parent
85bb626d83
commit
3a9ac250e2
1 changed files with 6 additions and 1 deletions
|
@ -272,9 +272,14 @@ lib.makeScope pkgs.newScope (self: {
|
|||
};
|
||||
|
||||
inherit (poetryPython) poetryPackages;
|
||||
inherit (lib) elem;
|
||||
|
||||
# Don't add editable sources to the environment since they will sometimes fail to build and are not useful in the development env
|
||||
editableAttrs = lib.attrNames editablePackageSources;
|
||||
envPkgs = builtins.filter (drv: ! lib.elem (drv.pname or drv.name or "") editableAttrs) poetryPackages;
|
||||
|
||||
in
|
||||
poetryPython.python.withPackages (ps: poetryPackages ++ (extraPackages ps));
|
||||
poetryPython.python.withPackages (ps: envPkgs ++ (extraPackages ps));
|
||||
|
||||
/* Creates a Python application from pyproject.toml and poetry.lock
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue