anchor.diff:      ''}
   
       ${stdenv.lib.optionalString stdenv.isDarwin ''
  -      export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH''${DYLD_LIBRARY_PATH:+:}`pwd`/lib
         # Removing tests depending on charset conversion
         substituteInPlace ../test/Makefile --replace "conversions.sh" ""
         rm -f ../tests/bugfixes/redmine/test_issue_460.py
         rm -f ../tests/bugfixes/redmine/test_issue_662.py
        ''}
  -  '';
  -
  -  postCheck = ''
  -    (cd ../tests/ && python3 runner.py)
     '';
   
     # With CMake we have to enable samples or there won't be
  
positive.code: 
  stdenv.mkDerivation rec {
    pname = "exiv2";
    version = "0.27.2";
  
    src = fetchFromGitHub {
      owner = "exiv2";
      repo  = "exiv2";
      rev = "v${version}";
      sha256 = "0n8il52yzbmvbkryrl8waz7hd9a2fdkw8zsrmhyh63jlvmmc31gf";
    };
  
    patches = [
      # included in next release
      (fetchpatch {
        name = "cve-2019-20421.patch";
        url = "https://github.com/Exiv2/exiv2/commit/a82098f4f90cd86297131b5663c3dec6a34470e8.patch";
        sha256 = "16r19qb9l5j43ixm5jqid9sdv5brlkk1wq0w79rm5agxq4kblfyc";
        excludes = [ "tests/bugfixes/github/test_issue_1011.py" "test/data/Jp2Image_readMetadata_loop.poc" ];
      })
    ];
  
  
negative.code:   preCheck = ''
      patchShebangs ../test/
      mkdir ../test/tmp
  
      ${stdenv.lib.optionalString (stdenv.isAarch64 || stdenv.isAarch32) ''
        # Fix tests on arm
  