jsoncpp: fix build with secure memory
jsoncpp changed the secure memory definition with 1.9.7 and made it possible to enable it directly via cmake. Signed-off-by: Markus Theil <theil.markus@gmail.com>
This commit is contained in:
@@ -35,10 +35,6 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
export sourceRoot=${finalAttrs.src.name}
|
||||
'';
|
||||
|
||||
postPatch = lib.optionalString secureMemory ''
|
||||
sed -i 's/#define JSONCPP_USING_SECURE_MEMORY 0/#define JSONCPP_USING_SECURE_MEMORY 1/' include/json/version.h
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
python3
|
||||
@@ -46,6 +42,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
];
|
||||
|
||||
cmakeFlags = [
|
||||
"-DJSONCPP_USE_SECURE_MEMORY=${if secureMemory then "ON" else "OFF"}"
|
||||
"-DBUILD_SHARED_LIBS=ON"
|
||||
"-DBUILD_OBJECT_LIBS=OFF"
|
||||
"-DJSONCPP_WITH_CMAKE_PACKAGE=ON"
|
||||
|
||||
Reference in New Issue
Block a user