mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-22 14:45:27 +00:00
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.
This commit is contained in:
parent
e2c6740c37
commit
854d16d74e
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue