Skip to content

Commit

Permalink
poetry2nix: 1.27.1 -> 1.28.0
Browse files Browse the repository at this point in the history
  • Loading branch information
adisbladis committed May 4, 2022
1 parent b4cc9cd commit 063015e
Show file tree
Hide file tree
Showing 4 changed files with 262 additions and 12 deletions.
12 changes: 10 additions & 2 deletions pkgs/development/tools/poetry2nix/poetry2nix/default.nix
Expand Up @@ -5,7 +5,7 @@
}:
let
# Poetry2nix version
version = "1.27.1";
version = "1.28.0";

inherit (poetryLib) isCompatible readTOML moduleName;

Expand Down Expand Up @@ -287,12 +287,20 @@ lib.makeScope pkgs.newScope (self: {
(name: value: projectDir + "/${value.path}")
(lib.filterAttrs (name: dep: dep.develop or false && hasAttr "path" dep) set);

editablePackageSources' = (
excludedEditablePackageNames = builtins.filter
(pkg: editablePackageSources."${pkg}" == null)
(builtins.attrNames editablePackageSources);

allEditablePackageSources = (
(getEditableDeps (pyProject.tool.poetry."dependencies" or { }))
// (getEditableDeps (pyProject.tool.poetry."dev-dependencies" or { }))
// editablePackageSources
);

editablePackageSources' = builtins.removeAttrs
allEditablePackageSources
excludedEditablePackageNames;

poetryPython = self.mkPoetryPackages {
inherit pyproject poetrylock overrides python pwd preferWheels pyProject;
editablePackageSources = editablePackageSources';
Expand Down
2 changes: 1 addition & 1 deletion pkgs/development/tools/poetry2nix/poetry2nix/lib.nix
Expand Up @@ -180,7 +180,7 @@ let
hasGitIgnore = builtins.pathExists gitIgnore;
gitIgnores = if hasGitIgnore then [ gitIgnore ] else [ ];
in
lib.optionals (builtins.toString path != "/" && ! isGitRoot) (findGitIgnores parent) ++ gitIgnores;
lib.optionals (builtins.pathExists path && builtins.toString path != "/" && ! isGitRoot) (findGitIgnores parent) ++ gitIgnores;

/*
Provides a source filtering mechanism that:
Expand Down

0 comments on commit 063015e

Please sign in to comment.