dtc: fix cross

Cross compilation of dtc was broken by the build system change in
280160bd1d.

Currently dtc's configury fails for cross builds unless you disable
the tests at configurePhase-time.  Simply not running the test
target is insufficient.
This commit is contained in:
Adam Joseph 2023-06-10 12:39:27 -07:00
parent a12a82e90b
commit 4cccbcd768

View File

@ -86,9 +86,15 @@ stdenv.mkDerivation rec {
(lib.mesonBool "tests" doCheck)
];
# Checks are broken on aarch64 darwin
# https://github.com/NixOS/nixpkgs/pull/118700#issuecomment-885892436
doCheck = !stdenv.isDarwin;
doCheck =
# Checks are broken on aarch64 darwin
# https://github.com/NixOS/nixpkgs/pull/118700#issuecomment-885892436
!stdenv.isDarwin &&
# we must explicitly disable this here so that mesonFlags receives
# `-Dtests=disabled`; without it meson will attempt to run
# hostPlatform binaries during the configurePhase.
(with stdenv; buildPlatform.canExecute hostPlatform);
meta = with lib; {
description = "Device Tree Compiler";