about summary refs log tree commit diff
path: root/pkgs/development/compilers/dtc
diff options
context:
space:
mode:
authorOtavio Salvador <otavio@ossystems.com.br>2023-06-01 10:32:24 -0300
committerOtavio Salvador <otavio@ossystems.com.br>2023-06-01 10:34:22 -0300
commit219b397071617fb3a71be757f64f0586be971ad4 (patch)
tree5e723ebd2f80993880fa7048df65f3085dbb6b26 /pkgs/development/compilers/dtc
parent31b198ad6fc85ee8af80771063dda06a99de043f (diff)
dtc: avoid building tests in case doCheck is disabled
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Diffstat (limited to 'pkgs/development/compilers/dtc')
-rw-r--r--pkgs/development/compilers/dtc/default.nix7
1 files changed, 7 insertions, 0 deletions
diff --git a/pkgs/development/compilers/dtc/default.nix b/pkgs/development/compilers/dtc/default.nix
index 4dbfd6f2bb903..04c56d0d42537 100644
--- a/pkgs/development/compilers/dtc/default.nix
+++ b/pkgs/development/compilers/dtc/default.nix
@@ -42,6 +42,12 @@ stdenv.mkDerivation rec {
       url = "https://github.com/dgibson/dtc/commit/3acde70714df3623e112cf3ec99fc9b5524220b8.patch";
       sha256 = "sha256-uLXL0Sjcn+bnMuF+A6PjUW1Rq6uNg1dQl58zbeYpP/U=";
     })
+
+    # meson: allow disabling tests
+    (fetchpatch {
+      url = "https://github.com/dgibson/dtc/commit/35f26d2921b68d97fefbd5a2b6e821a2f02ff65d.patch";
+      sha256 = "sha256-cO4f/jJX/pQL7kk4jpKUhsCVESW2ZuWaTr7z3BuvVkw=";
+    })
   ];
 
   env.SETUPTOOLS_SCM_PRETEND_VERSION = version;
@@ -77,6 +83,7 @@ stdenv.mkDerivation rec {
   mesonAutoFeatures = "auto";
   mesonFlags = [
     (lib.mesonBool "static-build" stdenv.hostPlatform.isStatic)
+    (lib.mesonBool "tests" doCheck)
   ];
 
   postFixup = lib.optionalString stdenv.isDarwin ''