anchor.diff:  , libtiff
   , enableX11 ? false
   , libX11
  +, buildPackages
   }:
   
   stdenv.mkDerivation {
  
positive.code:     jbigkit
    ] ++ lib.optional enableX11 libX11;
  
    enableParallelBuilding = true;
  
    postPatch = ''
      # Install libnetpbm.so symlink to correct destination
      substituteInPlace lib/Makefile \
        --replace '/sharedlink' '/lib'
    '';
  
    configurePhase = ''
  
negative.code: 
      # Disable building static library
      echo "STATICLIB_TOO = N" >> config.mk
  
      # Enable cross-compilation
      echo 'AR = ${stdenv.lib.getBin stdenv.cc.bintools.bintools}/bin/${stdenv.cc.targetPrefix}ar' >> config.mk
      echo 'CC = ${stdenv.cc}/bin/${stdenv.cc.targetPrefix}cc' >> config.mk
      echo 'CC_FOR_BUILD = ${buildPackages.stdenv.cc}/bin/${buildPackages.stdenv.cc.targetPrefix}cc' >> config.mk
      echo 'LD_FOR_BUILD = $(CC_FOR_BUILD)' >> config.mk
      echo 'RANLIB = ${stdenv.lib.getBin stdenv.cc.bintools.bintools}/bin/${stdenv.cc.targetPrefix}ranlib' >> config.mk
  
      # Use libraries from Nixpkgs
      echo "TIFFLIB = libtiff.so" >> config.mk
  