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")
(cherry picked from commit b949778bed)
This commit is contained in:
Alyssa Ross
2023-06-11 19:29:51 +00:00
parent 4dbaf3db32
commit bb7374804c

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