anchor.diff: -{ lib, stdenv, fetchFromGitHub, cmake, python3, validatePkgConfig, fetchpatch }:
  +{ lib
  +, stdenv
  +, fetchFromGitHub
  +, cmake
  +, python3
  +, validatePkgConfig
  +, fetchpatch
  +, secureMemory ? false
  +, enableStatic ? stdenv.hostPlatform.isStatic
  +}:
   
   stdenv.mkDerivation rec {
     pname = "jsoncpp";
  
positive.code: 
    cmakeFlags = [
      "-DBUILD_SHARED_LIBS=ON"
      "-DBUILD_STATIC_LIBS=OFF"
      "-DBUILD_OBJECT_LIBS=OFF"
      "-DJSONCPP_WITH_CMAKE_PACKAGE=ON"
    ] ++ lib.optional (stdenv.buildPlatform != stdenv.hostPlatform) "-DJSONCPP_WITH_TESTS=OFF";
  
    meta = with lib; {
      homepage = "https://github.com/open-source-parsers/jsoncpp";
  
negative.code:     export sourceRoot=${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
    '';
  
    # Hack to be able to run the test, broken because we use
    # CMAKE_SKIP_BUILD_RPATH to avoid cmake resetting rpath on install
    preBuild = if stdenv.isDarwin then ''
  