Skip to content

Commit

Permalink
Merge pull request #181654 from amjoseph-nixpkgs/pr/nlohmann_json/all…
Browse files Browse the repository at this point in the history
…ow_overrides

nlohmann_json: allow overrides by eliminating use of `rec`
  • Loading branch information
winterqt committed Jul 17, 2022
2 parents 2815ff9 + 5a02dc8 commit 57bfdfa
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions pkgs/development/libraries/nlohmann_json/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,23 @@ let
rev = "v3.0.0";
sha256 = "O6p2PFB7c2KE9VqWvmTaFywbW1hSzAP5V42EuemX+ls=";
};
in stdenv.mkDerivation rec {
in stdenv.mkDerivation (finalAttrs: {
pname = "nlohmann_json";
version = "3.10.5";

src = fetchFromGitHub {
owner = "nlohmann";
repo = "json";
rev = "v${version}";
rev = "v${finalAttrs.version}";
sha256 = "DTsZrdB9GcaNkx7ZKxcgCA3A9ShM5icSF0xyGguJNbk=";
};

nativeBuildInputs = [ cmake ];

cmakeFlags = [
"-DBuildTests=${if doCheck then "ON" else "OFF"}"
"-DBuildTests=${if finalAttrs.doCheck then "ON" else "OFF"}"
"-DJSON_MultipleHeaders=ON"
] ++ lib.optional doCheck "-DJSON_TestDataDirectory=${testData}";
] ++ lib.optional finalAttrs.doCheck "-DJSON_TestDataDirectory=${testData}";

doCheck = stdenv.hostPlatform == stdenv.buildPlatform;

Expand All @@ -44,4 +44,4 @@ in stdenv.mkDerivation rec {
license = licenses.mit;
platforms = platforms.all;
};
}
})

0 comments on commit 57bfdfa

Please sign in to comment.