anchor.diff:  , libdeflate, libpng, libtiff, zlib, lcms2, jpylyzer
   , jpipLibSupport ? false # JPIP library & executables
   , jpipServerSupport ? false, curl, fcgi # JPIP Server
  -, opjViewerSupport ? false, wxGTK # OPJViewer executable
  -, openjpegJarSupport ? false # Openjpeg jar (Java)
   , jdk
   , poppler
   }:
  
positive.code:     license = licenses.bsd2;
      maintainers = with maintainers; [ codyopel ];
      platforms = platforms.all;
      # opj viewer fails to compile with lots of errors, jar requires openjpeg library already compiled and installed
      broken = (opjViewerSupport || openjpegJarSupport);
    };
  }
  
negative.code: 
    buildInputs = [ libdeflate libpng libtiff zlib lcms2 ]
      ++ lib.optionals jpipServerSupport [ curl fcgi ]
      ++ lib.optional (jpipLibSupport) jdk;
  
    doCheck = (!stdenv.isAarch64 && !stdenv.hostPlatform.isPower64); # tests fail on aarch64-linux and powerpc64
  
  