anchor.diff:      TIFFINC = ;
       HAVE_TIFF = true ;
   
  +    PNGLIB = ;
  +    PNGINC = ;
  +    HAVE_PNG = true ;
  +
  +    ZLIB = ;
  +    ZINC = ;
  +    HAVE_Z = true ;
  +
  +    SSLLIB = ;
  +    SSLINC = ;
  +    HAVE_SSL = true ;
  +
       LINKFLAGS +=
         ${lib.concatStringsSep " " (map (x: "-L${x}/lib") buildInputs)}
         -ldl -lrt -lX11 -lXext -lXxf86vm -lXinerama -lXrandr -lXau -lXdmcp -lXss
  -      -ljpeg -ltiff ;
  +      -ljpeg -ltiff -lpng -lssl ;
     '';
   
     nativeBuildInputs = [ jam unzip ];
  
positive.code: { stdenv, fetchurl, jam, unzip, libX11, libXxf86vm, libXrandr, libXinerama
  , libXrender, libXext, libtiff, libjpeg, libXScrnSaver, writeText
  , libXdmcp, libXau, lib }:
  
  stdenv.mkDerivation rec {
    name = "argyllcms-1.4.0";
  
    src = fetchurl {
      url = "http://www.argyllcms.com/Argyll_V1.4.0_src.zip";
      sha256 = "1a5i0972cjp6asmawmyzih2y4bv3i0qvf7p6z5lxnr199mq38cfk";
    };
  
    # The contents of this file comes from the Jamtop file from the
  
negative.code:   preConfigure = ''
      cp ${jamTop} Jamtop
      substituteInPlace Makefile --replace "-j 3" "-j $NIX_BUILD_CORES"
      # Remove tiff, jpg and png to be sure the nixpkgs-provided ones are used
      rm -rf tiff jpg png
    '';
  
    buildInputs = [
      libtiff libjpeg libpng libX11 libXxf86vm libXrandr libXinerama libXext
      libXrender libXScrnSaver libXdmcp libXau openssl
    ];
  
    buildFlags = "PREFIX=$(out) all";
  
    installFlags = "PREFIX=$(out)";
  
    # Install udev rules, but remove lines that set up the udev-acl
    # stuff, since that is handled by udev's own rules (70-udev-acl.rules)
    #
    # Move ref to a better place (there must be a way to make the install target
    # do that for us)
    postInstall = ''
      rm -v $out/bin/License.txt
      mkdir -p $out/etc/udev/rules.d
      sed -i '/udev-acl/d' usb/55-Argyll.rules
      cp -v usb/55-Argyll.rules $out/etc/udev/rules.d/
      mkdir -p $out/share/
      mv $out/ref $out/share/argyllcms
    '';
  
    meta = with stdenv.lib; {
  