mirror of
https://github.com/nix-community/dream2nix.git
synced 2024-12-23 14:31:55 +03:00
pip: switch to format = "pyproject"
This should resolve collision issues with the setuptools that gets propagated by setuptoolsBuildHook
This commit is contained in:
parent
0f2d06b43e
commit
a6837ba21e
@ -44,15 +44,24 @@
|
|||||||
)
|
)
|
||||||
metadata.sources;
|
metadata.sources;
|
||||||
|
|
||||||
dependencyModule = {config, ...}: {
|
dependencyModule = {config, ...}: let
|
||||||
|
setuptools =
|
||||||
|
if config.name == "setuptools"
|
||||||
|
then config.deps.python.pkgs.setuptools
|
||||||
|
else config.pip.drvs.setuptools.public or config.deps.python.pkgs.setuptools;
|
||||||
|
in {
|
||||||
# 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.format = l.mkDefault (
|
buildPythonPackage.format = l.mkDefault (
|
||||||
if l.hasSuffix ".whl" config.mkDerivation.src
|
if l.hasSuffix ".whl" config.mkDerivation.src
|
||||||
then "wheel"
|
then "wheel"
|
||||||
else "setuptools"
|
else "pyproject"
|
||||||
);
|
);
|
||||||
|
mkDerivation.buildInputs =
|
||||||
|
lib.optionals
|
||||||
|
(! lib.hasSuffix ".whl" config.mkDerivation.src)
|
||||||
|
[setuptools];
|
||||||
};
|
};
|
||||||
|
|
||||||
fetchers = {
|
fetchers = {
|
||||||
|
Loading…
Reference in New Issue
Block a user