mirror of
https://github.com/nix-community/dream2nix.git
synced 2024-09-11 14:35: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;
|
inherit name;
|
||||||
version = lib.mkDefault pkg.version;
|
version = lib.mkDefault pkg.version;
|
||||||
sourceSelector = lib.mkOptionDefault config.pdm.sourceSelector;
|
sourceSelector = lib.mkOptionDefault config.pdm.sourceSelector;
|
||||||
buildPythonPackage =
|
buildPythonPackage.format = lib.mkDefault (
|
||||||
if lib.hasSuffix ".whl" source.file
|
if lib.hasSuffix ".whl" source.file
|
||||||
then {
|
then "wheel"
|
||||||
format = lib.mkDefault "wheel";
|
else null
|
||||||
}
|
);
|
||||||
else {
|
|
||||||
pyproject = lib.mkDefault true;
|
|
||||||
};
|
|
||||||
mkDerivation = {
|
mkDerivation = {
|
||||||
# TODO: handle sources outside pypi.org
|
# TODO: handle sources outside pypi.org
|
||||||
src = lib.mkDefault (libpyproject-fetchers.fetchFromLegacy {
|
src = lib.mkDefault (libpyproject-fetchers.fetchFromLegacy {
|
||||||
|
@ -56,14 +56,12 @@
|
|||||||
# deps.python cannot be defined in commonModule as this would trigger an
|
# deps.python cannot be defined in commonModule as this would trigger an
|
||||||
# infinite recursion.
|
# infinite recursion.
|
||||||
deps = {inherit python;};
|
deps = {inherit python;};
|
||||||
buildPythonPackage =
|
buildPythonPackage.format = lib.mkDefault (
|
||||||
if lib.hasSuffix ".whl" cfg.mkDerivation.src
|
if lib.hasSuffix ".whl" cfg.mkDerivation.src
|
||||||
then {
|
then "wheel"
|
||||||
format = lib.mkDefault "wheel";
|
else null
|
||||||
}
|
);
|
||||||
else {
|
|
||||||
pyproject = lib.mkDefault true;
|
|
||||||
};
|
|
||||||
mkDerivation.buildInputs =
|
mkDerivation.buildInputs =
|
||||||
lib.optionals
|
lib.optionals
|
||||||
(! lib.hasSuffix ".whl" cfg.mkDerivation.src)
|
(! lib.hasSuffix ".whl" cfg.mkDerivation.src)
|
||||||
|
Loading…
Reference in New Issue
Block a user