mirror of
https://github.com/nix-community/dream2nix.git
synced 2024-08-16 18:00:30 +03:00
fix default for format/pyproject in pip and pdm
This commit is contained in:
parent
1dda463e0b
commit
9c38c4fe41
@ -186,14 +186,11 @@ in {
|
||||
inherit name;
|
||||
version = lib.mkDefault pkg.version;
|
||||
sourceSelector = lib.mkOptionDefault config.pdm.sourceSelector;
|
||||
buildPythonPackage =
|
||||
buildPythonPackage.format = lib.mkDefault (
|
||||
if lib.hasSuffix ".whl" source.file
|
||||
then {
|
||||
format = lib.mkDefault "wheel";
|
||||
}
|
||||
else {
|
||||
pyproject = lib.mkDefault true;
|
||||
};
|
||||
then "wheel"
|
||||
else null
|
||||
);
|
||||
mkDerivation = {
|
||||
# TODO: handle sources outside pypi.org
|
||||
src = lib.mkDefault (libpyproject-fetchers.fetchFromLegacy {
|
||||
|
@ -56,14 +56,12 @@
|
||||
# deps.python cannot be defined in commonModule as this would trigger an
|
||||
# infinite recursion.
|
||||
deps = {inherit python;};
|
||||
buildPythonPackage =
|
||||
buildPythonPackage.format = lib.mkDefault (
|
||||
if lib.hasSuffix ".whl" cfg.mkDerivation.src
|
||||
then {
|
||||
format = lib.mkDefault "wheel";
|
||||
}
|
||||
else {
|
||||
pyproject = lib.mkDefault true;
|
||||
};
|
||||
then "wheel"
|
||||
else null
|
||||
);
|
||||
|
||||
mkDerivation.buildInputs =
|
||||
lib.optionals
|
||||
(! lib.hasSuffix ".whl" cfg.mkDerivation.src)
|
||||
|
Loading…
Reference in New Issue
Block a user