mirror of
https://github.com/vale981/poetry2nix
synced 2025-03-04 16:51:40 -05:00
Remove hard-coded known build systems
We can attempt to dynamically fetch this from the python package set instead.
This commit is contained in:
parent
9b33e9e3b6
commit
03d439fed3
1 changed files with 4 additions and 6 deletions
10
lib.nix
10
lib.nix
|
@ -60,14 +60,12 @@ let
|
|||
{ pythonPackages
|
||||
, pyProject
|
||||
}: let
|
||||
knownBuildSystems = {
|
||||
"intreehooks:loader" = [ pythonPackages.intreehooks ];
|
||||
"poetry.masonry.api" = [ pythonPackages.poetry ];
|
||||
"" = [];
|
||||
};
|
||||
buildSystem = lib.getAttrFromPath [ "build-system" "build-backend" ] pyProject;
|
||||
drvAttr = builtins.elemAt (builtins.split "\\.|:" buildSystem) 0;
|
||||
in
|
||||
knownBuildSystems.${buildSystem} or (throw "unsupported build system ${buildSystem}");
|
||||
if buildSystem == "" then [] else (
|
||||
[ pythonPackages.${drvAttr} or (throw "unsupported build system ${buildSystem}") ]
|
||||
);
|
||||
|
||||
in
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue