diff options
author | Winter <winter@winter.cafe> | 2022-07-16 20:20:23 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-16 20:20:23 -0400 |
commit | 57bfdfae1747fa296400ab0558eb9f8ab5916118 (patch) | |
tree | d26e59d6b33e67458499a99c33a2ba376e2437e6 | |
parent | 2815ff97dd5384da30a928addf8ca6563e33b034 (diff) | |
parent | 5a02dc8ee81a50842892d6b0eb7a778af0ed5077 (diff) | |
download | nixpkgs-57bfdfae1747fa296400ab0558eb9f8ab5916118.tar nixpkgs-57bfdfae1747fa296400ab0558eb9f8ab5916118.tar.gz nixpkgs-57bfdfae1747fa296400ab0558eb9f8ab5916118.tar.bz2 nixpkgs-57bfdfae1747fa296400ab0558eb9f8ab5916118.tar.lz nixpkgs-57bfdfae1747fa296400ab0558eb9f8ab5916118.tar.xz nixpkgs-57bfdfae1747fa296400ab0558eb9f8ab5916118.tar.zst nixpkgs-57bfdfae1747fa296400ab0558eb9f8ab5916118.zip |
Merge pull request #181654 from amjoseph-nixpkgs/pr/nlohmann_json/allow_overrides
nlohmann_json: allow overrides by eliminating use of `rec`
-rw-r--r-- | pkgs/development/libraries/nlohmann_json/default.nix | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/pkgs/development/libraries/nlohmann_json/default.nix b/pkgs/development/libraries/nlohmann_json/default.nix index 0e3fb180c81..ec4df7927f2 100644 --- a/pkgs/development/libraries/nlohmann_json/default.nix +++ b/pkgs/development/libraries/nlohmann_json/default.nix @@ -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; @@ -44,4 +44,4 @@ in stdenv.mkDerivation rec { license = licenses.mit; platforms = platforms.all; }; -} +}) |