stdenv: introduce and use config.doCheckByDefault
option
This commit is contained in:
parent
50af975d85
commit
d834ba6654
@ -46,11 +46,13 @@ rec {
|
|||||||
(stdenv.hostPlatform != stdenv.buildPlatform)
|
(stdenv.hostPlatform != stdenv.buildPlatform)
|
||||||
[ "build" "host" ]
|
[ "build" "host" ]
|
||||||
|
|
||||||
|
# TODO(@Ericson2314): Make unconditional / resolve #33599
|
||||||
# Check phase
|
# Check phase
|
||||||
, doCheck ? false
|
, doCheck ? config.doCheckByDefault or false
|
||||||
|
|
||||||
|
# TODO(@Ericson2314): Make unconditional / resolve #33599
|
||||||
# InstallCheck phase
|
# InstallCheck phase
|
||||||
, doInstallCheck ? false
|
, doInstallCheck ? config.doCheckByDefault or false
|
||||||
|
|
||||||
, crossConfig ? null
|
, crossConfig ? null
|
||||||
, meta ? {}
|
, meta ? {}
|
||||||
@ -120,6 +122,11 @@ rec {
|
|||||||
]
|
]
|
||||||
];
|
];
|
||||||
|
|
||||||
|
# TODO(@oxij, @Ericson2314): This is here to keep the old semantics, remove when
|
||||||
|
# no package has `doCheck = true`.
|
||||||
|
doCheck' = doCheck && stdenv.hostPlatform == stdenv.buildPlatform;
|
||||||
|
doInstallCheck' = doInstallCheck && stdenv.hostPlatform == stdenv.buildPlatform;
|
||||||
|
|
||||||
outputs' =
|
outputs' =
|
||||||
outputs ++
|
outputs ++
|
||||||
(if separateDebugInfo then assert stdenv.hostPlatform.isLinux; [ "debug" ] else []);
|
(if separateDebugInfo then assert stdenv.hostPlatform.isLinux; [ "debug" ] else []);
|
||||||
@ -127,6 +134,7 @@ rec {
|
|||||||
derivationArg =
|
derivationArg =
|
||||||
(removeAttrs attrs
|
(removeAttrs attrs
|
||||||
["meta" "passthru" "crossAttrs" "pos"
|
["meta" "passthru" "crossAttrs" "pos"
|
||||||
|
"doCheck" "doInstallCheck"
|
||||||
"__impureHostDeps" "__propagatedImpureHostDeps"
|
"__impureHostDeps" "__propagatedImpureHostDeps"
|
||||||
"sandboxProfile" "propagatedSandboxProfile"])
|
"sandboxProfile" "propagatedSandboxProfile"])
|
||||||
// (let
|
// (let
|
||||||
@ -202,12 +210,10 @@ rec {
|
|||||||
__propagatedImpureHostDeps = computedPropagatedImpureHostDeps ++ __propagatedImpureHostDeps;
|
__propagatedImpureHostDeps = computedPropagatedImpureHostDeps ++ __propagatedImpureHostDeps;
|
||||||
} // lib.optionalAttrs (outputs' != [ "out" ]) {
|
} // lib.optionalAttrs (outputs' != [ "out" ]) {
|
||||||
outputs = outputs';
|
outputs = outputs';
|
||||||
} // lib.optionalAttrs (attrs ? doCheck) {
|
} // lib.optionalAttrs doCheck' {
|
||||||
# TODO(@Ericson2314): Make unconditional / resolve #33599
|
doCheck = true;
|
||||||
doCheck = doCheck && (stdenv.hostPlatform == stdenv.buildPlatform);
|
} // lib.optionalAttrs doInstallCheck' {
|
||||||
} // lib.optionalAttrs (attrs ? doInstallCheck) {
|
doInstallCheck = true;
|
||||||
# TODO(@Ericson2314): Make unconditional / resolve #33599
|
|
||||||
doInstallCheck = doInstallCheck && (stdenv.hostPlatform == stdenv.buildPlatform);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
validity = import ./check-meta.nix {
|
validity = import ./check-meta.nix {
|
||||||
|
Loading…
Reference in New Issue
Block a user