From 854d16d74eca1a186f422a5eebc7b2befe1f0bc3 Mon Sep 17 00:00:00 2001 From: Remy Goldschmidt Date: Fri, 2 Sep 2016 17:23:46 -0500 Subject: nlohmann_json: 2.0.2 -> 2.0.3 `cmake` should be in `nativeBuildInputs` as it is only required at build time. For obvious reasons we can't have the tests running during a cross-compile. I figured I'd update the package version while I was at it, though these changes have also been tested independently of the version update. --- pkgs/development/libraries/nlohmann_json/default.nix | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'pkgs/development/libraries/nlohmann_json/default.nix') diff --git a/pkgs/development/libraries/nlohmann_json/default.nix b/pkgs/development/libraries/nlohmann_json/default.nix index 819160a8d7c..dcc0c781ee0 100644 --- a/pkgs/development/libraries/nlohmann_json/default.nix +++ b/pkgs/development/libraries/nlohmann_json/default.nix @@ -2,20 +2,27 @@ stdenv.mkDerivation rec { name = "nlohmann_json-${version}"; - version = "2.0.2"; + version = "2.0.3"; src = fetchFromGitHub { owner = "nlohmann"; repo = "json"; rev = "v${version}"; - sha256 = "10sk8d23vh0c7b3qafjz2n8r5jv8vc275bl069ikhqnx1zxv6hwp"; + sha256 = "192mg2y93g9q0jdn3fdffydpxk19nsrcv92kfip6srkdkwja18ri"; }; - buildInputs = [ cmake ]; + nativeBuildInputs = [ cmake ]; doCheck = true; checkTarget = "test"; + crossAttrs = { + cmakeFlags = "-DBuildTests=OFF"; + doCheck = false; + } // stdenv.lib.optionalAttrs (stdenv.cross.libc == "msvcrt") { + cmakeFlags = "-DBuildTests=OFF -DCMAKE_SYSTEM_NAME=Windows"; + }; + meta = with stdenv.lib; { description = "Header only C++ library for the JSON file format"; homepage = https://github.com/nlohmann/json; -- cgit 1.4.1