dtc: fix cross

Now takes into account that stdenv always disables tests when cross
compiling.

Link: https://github.com/dgibson/dtc/pull/103#pullrequestreview-1473442177
Fixes: 219b397071 ("dtc: avoid building tests in case doCheck is disabled")
This commit is contained in:
Alyssa Ross 2023-06-11 19:29:51 +00:00
parent 748209b906
commit b949778bed
No known key found for this signature in database
GPG Key ID: F9DBED4859B271C0

View File

@ -83,7 +83,7 @@ stdenv.mkDerivation (finalAttrs: {
mesonAutoFeatures = "auto";
mesonFlags = [
(lib.mesonBool "static-build" stdenv.hostPlatform.isStatic)
(lib.mesonBool "tests" finalAttrs.doCheck)
(lib.mesonBool "tests" finalAttrs.finalPackage.doCheck)
];
# Checks are broken on aarch64 darwin