diff options
author | Alyssa Ross <hi@alyssa.is> | 2021-09-27 16:00:58 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2021-09-27 16:00:58 +0000 |
commit | c504e5d19d940926b3ddcf62c983d66f49f3cbb2 (patch) | |
tree | ec955e58bcac2cb93b9f8c10786b23f61d40cd7e /nixpkgs/pkgs/development/libraries/nlohmann_json | |
parent | 72789cefce7b17419815f600fbd18238d89afcc9 (diff) | |
parent | 1737f98af6667560e3e4f930312f9b5002649d04 (diff) | |
download | nixlib-c504e5d19d940926b3ddcf62c983d66f49f3cbb2.tar nixlib-c504e5d19d940926b3ddcf62c983d66f49f3cbb2.tar.gz nixlib-c504e5d19d940926b3ddcf62c983d66f49f3cbb2.tar.bz2 nixlib-c504e5d19d940926b3ddcf62c983d66f49f3cbb2.tar.lz nixlib-c504e5d19d940926b3ddcf62c983d66f49f3cbb2.tar.xz nixlib-c504e5d19d940926b3ddcf62c983d66f49f3cbb2.tar.zst nixlib-c504e5d19d940926b3ddcf62c983d66f49f3cbb2.zip |
Merge commit '1737f98af6667560e3e4f930312f9b5002649d04'
Conflicts: nixpkgs/nixos/modules/services/networking/ssh/sshd.nix nixpkgs/pkgs/applications/networking/irc/weechat/scripts/default.nix nixpkgs/pkgs/development/node-packages/default.nix nixpkgs/pkgs/development/python-modules/priority/deadline.patch
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/nlohmann_json')
-rw-r--r-- | nixpkgs/pkgs/development/libraries/nlohmann_json/default.nix | 43 |
1 files changed, 24 insertions, 19 deletions
diff --git a/nixpkgs/pkgs/development/libraries/nlohmann_json/default.nix b/nixpkgs/pkgs/development/libraries/nlohmann_json/default.nix index 41a967a5b709..d8ae8fcaa4ae 100644 --- a/nixpkgs/pkgs/development/libraries/nlohmann_json/default.nix +++ b/nixpkgs/pkgs/development/libraries/nlohmann_json/default.nix @@ -1,41 +1,46 @@ -{ lib, stdenv, fetchFromGitHub, fetchpatch, cmake +{ stdenv +, lib +, fetchFromGitHub +, cmake }: - -stdenv.mkDerivation rec { +let + testData = fetchFromGitHub { + owner = "nlohmann"; + repo = "json_test_data"; + rev = "v3.0.0"; + sha256 = "O6p2PFB7c2KE9VqWvmTaFywbW1hSzAP5V42EuemX+ls="; + }; +in stdenv.mkDerivation rec { pname = "nlohmann_json"; - version = "3.9.1"; + version = "3.10.2"; src = fetchFromGitHub { owner = "nlohmann"; repo = "json"; rev = "v${version}"; - sha256 = "sha256-THordDPdH2qwk6lFTgeFmkl7iDuA/7YH71PTUe6vJCs="; + sha256 = "/OFNfukrIyfJmD0ko174aud9T6ZOesHANJjyfk4q/Vs="; }; - patches = [ - # https://github.com/nlohmann/json/pull/2690 - (fetchpatch { - url = "https://github.com/nlohmann/json/commit/53a9850eebb88c6ff95f6042d08d5c0cc9d18097.patch"; - sha256 = "k+Og00nXNg5IsFQY5fWD3xVQQXUFFTie44UXole0S1M="; - }) - ]; - nativeBuildInputs = [ cmake ]; cmakeFlags = [ "-DBuildTests=${if doCheck then "ON" else "OFF"}" "-DJSON_MultipleHeaders=ON" - ]; + ] ++ lib.optional doCheck "-DJSON_TestDataDirectory=${testData}"; + + doCheck = stdenv.hostPlatform == stdenv.buildPlatform; - # A test cause the build to timeout https://github.com/nlohmann/json/issues/1816 - #doCheck = stdenv.hostPlatform == stdenv.buildPlatform; - doCheck = false; + # skip tests that require git or modify “installed files” + preCheck = '' + checkFlagsArray+=("ARGS=-LE 'not_reproducible|git_required'") + ''; postInstall = "rm -rf $out/lib64"; meta = with lib; { - description = "Header only C++ library for the JSON file format"; - homepage = "https://github.com/nlohmann/json"; + description = "JSON for Modern C++"; + homepage = "https://json.nlohmann.me"; + changelog = "https://github.com/nlohmann/json/blob/develop/ChangeLog.md"; license = licenses.mit; platforms = platforms.all; }; |