mirror of
https://github.com/nix-community/dream2nix.git
synced 2024-11-23 09:04:37 +03:00
poetry: add naive impl of build-system.requires
This commit is contained in:
parent
f11fa0fced
commit
eb88125101
@ -11,7 +11,11 @@
|
||||
"type": "object"
|
||||
},
|
||||
"application": { "type": "boolean" },
|
||||
"pythonAttr": { "type": "string" }
|
||||
"pythonAttr": { "type": "string" },
|
||||
"buildRequirements": {
|
||||
"type": "array",
|
||||
"items": { "type": "string" }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -46,7 +46,6 @@
|
||||
[pkgs.autoPatchelfHook]
|
||||
++ (with python.pkgs; [
|
||||
pip
|
||||
poetry-core
|
||||
wheel
|
||||
]);
|
||||
propagatedBuildInputs = [python.pkgs.setuptools];
|
||||
@ -61,15 +60,21 @@
|
||||
fname=$(stripHash $fname)
|
||||
cp $file dist/$fname
|
||||
done
|
||||
${python}/bin/python -m pip install \
|
||||
--find-links ./dist/ \
|
||||
|
||||
mkdir -p "$out/${python.sitePackages}"
|
||||
export PYTHONPATH="$out/${python.sitePackages}:$PYTHONPATH"
|
||||
|
||||
pipInstallFlags="--find-links ./dist/ \
|
||||
--no-build-isolation \
|
||||
--no-index \
|
||||
--no-warn-script-location \
|
||||
--prefix="$out" \
|
||||
--no-cache \
|
||||
. \
|
||||
$pipInstallFlags
|
||||
--ignore-installed \
|
||||
$pipInstallFlags"
|
||||
${python}/bin/python -m pip install $pipInstallFlags ${lib.concatStringsSep " " subsystemAttrs.buildRequirements}
|
||||
${python}/bin/python -m pip wheel --verbose --no-index --no-deps --no-clean --no-build-isolation --wheel-dir dist .
|
||||
${python}/bin/python -m pip install $pipInstallFlags .\
|
||||
'';
|
||||
installPhase = "true";
|
||||
});
|
||||
|
@ -115,6 +115,7 @@ in {
|
||||
application = false;
|
||||
pythonAttr = "python3";
|
||||
sourceFormats = {};
|
||||
buildRequirements = pyproject.build-system.requires or [];
|
||||
};
|
||||
|
||||
cyclicDependencies = {};
|
||||
|
Loading…
Reference in New Issue
Block a user