anchor.diff:      ++ optional javacSupport "--with-javac"
       ++ optional stdenv.isDarwin "--enable-darwin-64bit";
   
  -  postInstall = let
  -    manpages = fetchurl {
  -      url = "http://www.erlang.org/download/otp_doc_man_${version}.tar.gz";
  -      sha256 = "0abaqnw6hkr1h1zw6cdqwg2k7rfmj2b9sqqldnqf3qaj0shz759n";
  -    };
  -  in ''
  +  # install-docs will generate and install manpages and html docs
  +  # (PDFs are generated only when fop is available).
  +  installTargets = "install install-docs";
  +
  +  postInstall = ''
       ln -s $out/lib/erlang/lib/erl_interface*/bin/erl_call $out/bin/erl_call
  -    tar xf "${manpages}" -C "$out/lib/erlang"
  -    for i in "$out"/lib/erlang/man/man[0-9]/*.[0-9]; do
  -      prefix="''${i%/*}"
  -      ensureDir "$out/share/man/''${prefix##*/}"
  -      ln -s "$i" "$out/share/man/''${prefix##*/}/''${i##*/}erl"
  -    done
     '';
   
     # Some erlang bin/ scripts run sed and awk
  
positive.code: { stdenv, fetchurl, perl, gnum4, ncurses, openssl
  , gnused, gawk, makeWrapper
  , Carbon, Cocoa
  , odbcSupport ? false, unixODBC ? null
  , wxSupport ? true, mesa ? null, wxGTK ? null, xorg ? null, wxmac ? null
  
negative.code: 
    debugInfo = enableDebugInfo;
  
    rmAndPwdPatch = fetchurl {
       url = "https://github.com/erlang/otp/commit/98b8650d22e94a5ff839170833f691294f6276d0.patch";
       sha256 = "0cd5pkqrigiqz6cyma5irqwzn0bi17k371k9vlg8ir31h3zmqfip";
    };
  
    envAndCpPatch = fetchurl {
       url = "https://github.com/binarin/otp/commit/9f9841eb7327c9fe73e84e197fd2965a97b639cf.patch";
       sha256 = "10h5348p6g279b4q01i5jdqlljww5chcvrx5b4b0dv79pk0p0m9f";
    };
  
    patches = [
      rmAndPwdPatch
      envAndCpPatch
    ];
  
    preConfigure = ''
      ./otp_build autoconf
    '';
  
    configureFlags= [
  