mkTclDerivation: support nativeCheckInputs

This commit is contained in:
Guillaume Girol 2022-12-18 12:00:00 +00:00
parent 339a5491bb
commit dcfdd9d8da

View File

@ -10,6 +10,7 @@
, nativeBuildInputs ? [] , nativeBuildInputs ? []
, propagatedBuildInputs ? [] , propagatedBuildInputs ? []
, checkInputs ? [] , checkInputs ? []
, nativeCheckInputs ? []
# true if we should skip the configuration phase altogether # true if we should skip the configuration phase altogether
, dontConfigure ? false , dontConfigure ? false
@ -27,7 +28,7 @@
let let
inherit (tcl) stdenv; inherit (tcl) stdenv;
inherit (lib) getBin optionalAttrs optionals; inherit (lib) getBin optionalAttrs;
defaultTclPkgConfigureFlags = [ defaultTclPkgConfigureFlags = [
"--with-tcl=${tcl}/lib" "--with-tcl=${tcl}/lib"
@ -36,7 +37,7 @@ let
]; ];
self = (stdenv.mkDerivation ((builtins.removeAttrs attrs [ self = (stdenv.mkDerivation ((builtins.removeAttrs attrs [
"addTclConfigureFlags" "checkPhase" "checkInputs" "doCheck" "addTclConfigureFlags" "checkPhase" "checkInputs" "nativeCheckInputs" "doCheck"
]) // { ]) // {
buildInputs = buildInputs ++ [ tcl.tclPackageHook ]; buildInputs = buildInputs ++ [ tcl.tclPackageHook ];
@ -47,8 +48,9 @@ let
# Run tests after install, at which point we've done all TCLLIBPATH setup # Run tests after install, at which point we've done all TCLLIBPATH setup
doCheck = false; doCheck = false;
doInstallCheck = attrs.doCheck or ((attrs ? doInstallCheck) && attrs.doInstallCheck); doInstallCheck = attrs.doCheck or (attrs.doInstallCheck or false);
installCheckInputs = checkInputs ++ (optionals (attrs ? installCheckInputs) attrs.installCheckInputs); installCheckInputs = checkInputs ++ (attrs.installCheckInputs or []);
nativeInstallCheckInputs = nativeCheckInputs ++ (attrs.nativeInstallCheckInputs or []);
# Add typical values expected by TEA for configureFlags # Add typical values expected by TEA for configureFlags
configureFlags = configureFlags =