anchor.diff:  
     NIX_CFLAGS_COMPILE = "-fPIC"; # Gentoo adds this on every platform
   
  -  buildInputs = [ pkgconfig flex zlib perl libpng libjpeg libxml2 makeWrapper libX11 libtiff ];
  +  buildInputs =
  +    [ pkgconfig flex zlib perl libpng libjpeg libxml2 makeWrapper libtiff ]
  +    ++ lib.optional enableX11 libX11;
   
     configurePhase = ''
       cp config.mk.in config.mk
  +    echo "STATICLIB_TOO = n" >> config.mk
       substituteInPlace "config.mk" \
           --replace "TIFFLIB = NONE" "TIFFLIB = ${libtiff}/lib/libtiff.so" \
           --replace "TIFFHDR_DIR =" "TIFFHDR_DIR = ${libtiff}/include"
  
positive.code: { stdenv, fetchsvn, pkgconfig, libjpeg, libpng, flex, zlib, perl, libxml2, makeWrapper, libX11, libtiff }:
  
  let rev = 1742; in
  stdenv.mkDerivation {
    name = "netpbm-advanced-${toString rev}";
  
    src = fetchsvn {
      url = https://netpbm.svn.sourceforge.net/svnroot/netpbm/advanced;
      inherit rev;
      sha256 = "0csx6g0ci66nx1a6z0a9dkpfp66mdvcpp5r7g6zrx4jp18r9hzb2";
    };
  
    postPatch = /* CVE-2005-2471, from Arch */ ''
  
negative.code:   enableParallelBuilding = true;
  
    installPhase = ''
      make package pkgdir=$out
  
      rm -rf $out/link $out/*_template $out/{pkginfo,README,VERSION} $out/man/web
  
      mkdir -p $out/share/netpbm
      mv $out/misc $out/share/netpbm/
  
      # wrap any scripts that expect other programs in the package to be in their PATH
      for prog in ppmquant; do
  