mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-30 23:34:12 +03:00
Python: fix mkPythonDerivation doCheck
This commit is contained in:
parent
6e61dfb647
commit
e1d1a573e5
@ -41,6 +41,8 @@
|
|||||||
|
|
||||||
, passthru ? {}
|
, passthru ? {}
|
||||||
|
|
||||||
|
, doCheck ? false
|
||||||
|
|
||||||
, ... } @ attrs:
|
, ... } @ attrs:
|
||||||
|
|
||||||
|
|
||||||
@ -58,14 +60,14 @@ python.stdenv.mkDerivation (builtins.removeAttrs attrs ["disabled"] // {
|
|||||||
buildInputs = [ wrapPython ] ++ buildInputs ++ pythonPath
|
buildInputs = [ wrapPython ] ++ buildInputs ++ pythonPath
|
||||||
++ [ (ensureNewerSourcesHook { year = "1980"; }) ]
|
++ [ (ensureNewerSourcesHook { year = "1980"; }) ]
|
||||||
++ (lib.optional (lib.hasSuffix "zip" attrs.src.name or "") unzip)
|
++ (lib.optional (lib.hasSuffix "zip" attrs.src.name or "") unzip)
|
||||||
++ lib.optionals attrs.doCheck checkInputs;
|
++ lib.optionals doCheck checkInputs;
|
||||||
|
|
||||||
# propagate python/setuptools to active setup-hook in nix-shell
|
# propagate python/setuptools to active setup-hook in nix-shell
|
||||||
propagatedBuildInputs = propagatedBuildInputs ++ [ python setuptools ];
|
propagatedBuildInputs = propagatedBuildInputs ++ [ python setuptools ];
|
||||||
|
|
||||||
# Python packages don't have a checkPhase, only an installCheckPhase
|
# Python packages don't have a checkPhase, only an installCheckPhase
|
||||||
doCheck = false;
|
doCheck = false;
|
||||||
doInstallCheck = attrs.doCheck or false;
|
doInstallCheck = doCheck;
|
||||||
|
|
||||||
postFixup = attrs.postFixup or ''
|
postFixup = attrs.postFixup or ''
|
||||||
wrapPythonPrograms
|
wrapPythonPrograms
|
||||||
|
Loading…
Reference in New Issue
Block a user