anchor.diff:  # generic builder for Cabal packages
   
   { stdenv, fetchurl, lib, pkgconfig, ghc, Cabal, jailbreakCabal, glibcLocales
  -, gnugrep, coreutils, hscolour
  +, gnugrep, coreutils, hscolour, cpphs
   , enableLibraryProfiling ? false
   , enableSharedLibraries ? false
   , enableSharedExecutables ? false
   , enableStaticLibraries ? true
   , enableCheckPhase ? stdenv.lib.versionOlder "7.4" ghc.version
   , enableHyperlinkSource ? true
  +, enableCpphs ? false
   , extension ? (self : super : {})
   }:
   
  
positive.code:                 propagatedBuildInputs = filter (y : ! (y == null)) x.propagatedBuildInputs;
                  propagatedUserEnvPkgs = filter (y : ! (y == null)) x.propagatedUserEnvPkgs;
                  doCheck               = enableCheckPhase && x.doCheck;
                  hyperlinkSource       = enableHyperlinkSource && x.hyperlinkSource;
                  # Disable Darwin builds: <https://github.com/NixOS/nixpkgs/issues/2689>.
                  meta                  = let meta = x.meta or {};
  
negative.code:               export GHC_PACKAGE_PATH=$(${ghc.GHCPackages})
                test -n "$noHaddock" || ./Setup haddock --html --hoogle \
                    ${optionalString (stdenv.lib.versionOlder "6.12" ghc.version) "--ghc-options=-optP-P"} \
                    ${optionalString self.hyperlinkSource "--hyperlink-source"} \
                    ${optionalString self.useCpphs ''
                      --haddock-options="--optghc=-pgmPcpphs --optghc=-optP--cpp"
                    ''}
  
                eval "$postBuild"
              '';
  