summary refs log tree commit diff
path: root/pkgs/development/libraries/nlohmann_json
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2018-07-23 15:47:09 -0400
committerJohn Ericson <John.Ericson@Obsidian.Systems>2018-07-24 17:25:40 -0400
commit40c33cbd4e079173388dfdaf8e34b555be6b0a73 (patch)
tree26037cdd40cf6b4a4189ce8cdb77c1a9a96c1b93 /pkgs/development/libraries/nlohmann_json
parentc9f4991adababe3c0fa03602f145943ad0c2b6f1 (diff)
downloadnixpkgs-40c33cbd4e079173388dfdaf8e34b555be6b0a73.tar
nixpkgs-40c33cbd4e079173388dfdaf8e34b555be6b0a73.tar.gz
nixpkgs-40c33cbd4e079173388dfdaf8e34b555be6b0a73.tar.bz2
nixpkgs-40c33cbd4e079173388dfdaf8e34b555be6b0a73.tar.lz
nixpkgs-40c33cbd4e079173388dfdaf8e34b555be6b0a73.tar.xz
nixpkgs-40c33cbd4e079173388dfdaf8e34b555be6b0a73.tar.zst
nixpkgs-40c33cbd4e079173388dfdaf8e34b555be6b0a73.zip
nlohmann_json: No more crossAttrs
Diffstat (limited to 'pkgs/development/libraries/nlohmann_json')
-rw-r--r--pkgs/development/libraries/nlohmann_json/default.nix13
1 files changed, 6 insertions, 7 deletions
diff --git a/pkgs/development/libraries/nlohmann_json/default.nix b/pkgs/development/libraries/nlohmann_json/default.nix
index 59cc9438a9f..0e9ff5d9105 100644
--- a/pkgs/development/libraries/nlohmann_json/default.nix
+++ b/pkgs/development/libraries/nlohmann_json/default.nix
@@ -15,17 +15,16 @@ stdenv.mkDerivation rec {
 
   nativeBuildInputs = [ cmake ];
 
-  doCheck = true;
+  doCheck = stdenv.buildPlatform == stdenv.hostPlatform;
   checkTarget = "test";
 
   enableParallelBuilding = true;
 
-  crossAttrs = {
-    cmakeFlags = "-DBuildTests=OFF";
-    doCheck = false;
-  } // stdenv.lib.optionalAttrs (hostPlatform.libc == "msvcrt") {
-    cmakeFlags = "-DBuildTests=OFF -DCMAKE_SYSTEM_NAME=Windows";
-  };
+  cmakeFlags = [
+    "-DBuildTests=${if doCheck then "ON" else "OFF"}"
+  ] ++ stdenv.lib.optionals (hostPlatform.libc == "msvcrt") [
+    "-DCMAKE_SYSTEM_NAME=Windows"
+  ];
 
   meta = with stdenv.lib; {
     description = "Header only C++ library for the JSON file format";