Skip to content

Commit

Permalink
build.lib.renderers.mkDerivationEditable: Guard against non-existing …
Browse files Browse the repository at this point in the history
…pyproject
  • Loading branch information
adisbladis committed Jan 24, 2025
1 parent 28ca767 commit 177aaaa
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions build/lib/renderers.nix
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ in
Pass editable root either as a string pointing to an absolute path non-store path, or use environment variables for relative paths.
'';
let
inherit (project) pyproject;
project' = project.pyproject.project or { };

filteredDeps = pep621.filterDependenciesByEnviron environ extras project.dependencies;
depSpec = mkSpec filteredDeps.dependencies;
Expand Down Expand Up @@ -128,10 +128,10 @@ in
inherit project;
};
}
// optionalAttrs (pyproject.project ? name) { pname = pyproject.project.name; }
// optionalAttrs (pyproject.project ? version) { inherit (pyproject.project) version; }
// optionalAttrs (!pyproject.project ? version && pyproject.project ? name) {
inherit (pyproject.project) name;
// optionalAttrs (project' ? name) { pname = project'.name; }
// optionalAttrs (project' ? version) { inherit (project') version; }
// optionalAttrs (!project' ? version && project' ? name) {
inherit (project') name;
}
// optionalAttrs (project.projectRoot != null) { src = project.projectRoot; };

Expand Down

0 comments on commit 177aaaa

Please sign in to comment.