anchor.diff:  { stdenv, ghc, makeWrapper, coreutils }:
   
  -stdenv.mkDerivation {
  +let
  +  ghc761OrLater = !stdenv.lib.versionOlder ghc.version "7.6.1";
  +  packageDBFlag = if ghc761OrLater then "-package-db" else "-package-conf";
  +in
  +stdenv.mkDerivation ({
     name = "ghc-${ghc.version}-wrapper";
   
     buildInputs = [makeWrapper];
  
positive.code:   inherit ghc;
    inherit (ghc) meta;
    ghcVersion = ghc.version;
  }
  
negative.code:       makeWrapper $ghc/bin/$prg $out/bin/$prg --add-flags "\$($out/bin/ghc-get-packages.sh ${ghc.version} \"\$(dirname \$0)\")"
      done
      for prg in runghc runhaskell; do
        makeWrapper $ghc/bin/$prg $out/bin/$prg --add-flags "\$($out/bin/ghc-get-packages.sh ${ghc.version} \"\$(dirname \$0)\" \" ${packageDBFlag} --ghc-arg=\")"
      done
      for prg in ghc-pkg ghc-pkg-${ghc.version}; do
        makeWrapper $ghc/bin/$prg $out/bin/$prg --add-flags "\$($out/bin/ghc-get-packages.sh ${ghc.version} \"\$(dirname \$0)\" -${packageDBFlag}=)"
      done
      for prg in hp2ps hpc hasktags hsc2hs; do
        test -x $ghc/bin/$prg && ln -s $ghc/bin/$prg $out/bin/$prg
  