anchor.diff:          --replace "TIFFHDR_DIR =" "TIFFHDR_DIR = ${libtiff.dev}/include" \
           --replace "JPEGLIB = NONE" "JPEGLIB = ${libjpeg.out}/lib/libjpeg.so" \
           --replace "JPEGHDR_DIR =" "JPEGHDR_DIR = ${libjpeg.dev}/include"
  -   '' + stdenv.lib.optionalString stdenv.isDarwin ''
  +  '' + stdenv.lib.optionalString stdenv.isDarwin ''
       echo "LDSHLIB=-dynamiclib -install_name $out/lib/libnetpbm.\$(MAJ).dylib" >> config.mk
       echo "NETPBMLIBTYPE = dylib" >> config.mk
       echo "NETPBMLIBSUFFIX = dylib" >> config.mk
  
positive.code: { lib, stdenv, fetchsvn, pkgconfig, libjpeg, libpng, flex, zlib, perl, libxml2
  , makeWrapper, libtiff
  , enableX11 ? false, libX11 }:
  
  stdenv.mkDerivation {
    # Determine version and revision from:
  
negative.code:   passthru.updateScript = ./update.sh;
  
    meta = {
      homepage = "http://netpbm.sourceforge.net/";
      description = "Toolkit for manipulation of graphic images";
      license = lib.licenses.free; # http://netpbm.svn.code.sourceforge.net/p/netpbm/code/trunk/doc/copyright_summary
      platforms = with stdenv.lib.platforms; linux ++ darwin;
    };
  }
  