anchor.diff: -{ lib, stdenv, fetchurl, xmlto, docbook_xml_dtd_412, libxslt, docbook_xsl, autoconf, automake, gettext, libiconv, libtool}:
  +{ lib, stdenv, fetchurl, fetchpatch, xmlto, docbook_xml_dtd_412
  +, libxslt, docbook_xsl, autoconf, automake, gettext, libiconv, libtool}:
   
   stdenv.mkDerivation {
     name = "opensp-1.5.2";
  
positive.code:     sha256 = "1khpasr6l0a8nfz6kcf3s81vgdab8fm2dj291n5r2s53k228kx2p";
    };
  
    patchPhase = ''
      sed -i s,/usr/share/sgml/docbook/xml-dtd-4.1.2/,${docbook_xml_dtd_412}/xml/dtd/docbook/, \
        docsrc/*.xml
    '';
  
    configureFlags = lib.optional stdenv.isDarwin [
      "--with-libintl-prefix=/usr"
      "--with-libiconv-prefix=/usr"
    ];
  
    setupHook = ./setup-hook.sh;
  
    postFixup = ''
  
negative.code:   preConfigure = if stdenv.isCygwin then "autoreconf -fi" else null;
  
    # need autoconf, automake, gettext, and libtool for reconfigure
    nativeBuildInputs = stdenv.lib.optionals stdenv.isCygwin [ autoconf automake libtool ];
  
    buildInputs = [ xmlto docbook_xml_dtd_412 libxslt docbook_xsl gettext libiconv ];
  
    doCheck = false; # fails
  
  