buildPythonPackage: support nativeCheckInputs
This commit is contained in:
parent
f39abbc350
commit
339a5491bb
1 changed files with 5 additions and 3 deletions
|
@ -39,6 +39,7 @@
|
|||
# Dependencies needed for running the checkPhase.
|
||||
# These are added to buildInputs when doCheck = true.
|
||||
, checkInputs ? []
|
||||
, nativeCheckInputs ? []
|
||||
|
||||
# propagate build dependencies so in case we have A -> B -> C,
|
||||
# C can import package A propagated by B
|
||||
|
@ -114,7 +115,7 @@ let
|
|||
name_ = name;
|
||||
|
||||
self = toPythonModule (stdenv.mkDerivation ((builtins.removeAttrs attrs [
|
||||
"disabled" "checkPhase" "checkInputs" "doCheck" "doInstallCheck" "dontWrapPythonPrograms" "catchConflicts" "format"
|
||||
"disabled" "checkPhase" "checkInputs" "nativeCheckInputs" "doCheck" "doInstallCheck" "dontWrapPythonPrograms" "catchConflicts" "format"
|
||||
"disabledTestPaths" "outputs"
|
||||
]) // {
|
||||
|
||||
|
@ -169,13 +170,14 @@ let
|
|||
# Python packages don't have a checkPhase, only an installCheckPhase
|
||||
doCheck = false;
|
||||
doInstallCheck = attrs.doCheck or true;
|
||||
installCheckInputs = [
|
||||
nativeInstallCheckInputs = [
|
||||
] ++ lib.optionals (format == "setuptools") [
|
||||
# Longer-term we should get rid of this and require
|
||||
# users of this function to set the `installCheckPhase` or
|
||||
# pass in a hook that sets it.
|
||||
setuptoolsCheckHook
|
||||
] ++ checkInputs;
|
||||
] ++ nativeCheckInputs;
|
||||
installCheckInputs = checkInputs;
|
||||
|
||||
postFixup = lib.optionalString (!dontWrapPythonPrograms) ''
|
||||
wrapPythonPrograms
|
||||
|
|
Loading…
Reference in a new issue