anchor.diff:      fixupPhase = ":";
     });
   
  +  /* Use the gold linker. It is a linker for ELF that is designed
  +     "to run as fast as possible on modern systems"
  +   */
     linkWithGold = drv : appendConfigureFlag drv
       "--ghc-option=-optl-fuse-ld=gold --ld-option=-fuse-ld=gold --with-ld=ld.gold";
   
  -  # link executables statically against haskell libs to reduce closure size
  +  /* link executables statically against haskell libs to reduce
  +     closure size
  +   */
     justStaticExecutables = drv: overrideCabal drv (drv: {
       enableSharedExecutables = false;
       isLibrary = false;
  
positive.code: { pkgs, lib }:
  
  rec {
    makePackageSet = import ./make-package-set.nix;
  
    overrideCabal = drv: f: (drv.override (args: args // {
      mkDerivation = drv: (args.mkDerivation drv).override f;
    })) // {
      overrideScope = scope: overrideCabal (drv.overrideScope scope) f;
    };
  
    doCoverage = drv: overrideCabal drv (drv: { doCoverage = true; });
    dontCoverage = drv: overrideCabal drv (drv: { doCoverage = false; });
  
    doHaddock = drv: overrideCabal drv (drv: { doHaddock = true; });
    dontHaddock = drv: overrideCabal drv (drv: { doHaddock = false; });
  
    doJailbreak = drv: overrideCabal drv (drv: { jailbreak = true; });
    dontJailbreak = drv: overrideCabal drv (drv: { jailbreak = false; });
  
    doCheck = drv: overrideCabal drv (drv: { doCheck = true; });
    dontCheck = drv: overrideCabal drv (drv: { doCheck = false; });
  
    doBenchmark = drv: overrideCabal drv (drv: { doBenchmark = true; });
    dontBenchmark = drv: overrideCabal drv (drv: { doBenchmark = false; });
  
    doDistribute = drv: overrideCabal drv (drv: { hydraPlatforms = drv.platforms or ["i686-linux" "x86_64-linux" "x86_64-darwin"]; });
    dontDistribute = drv: overrideCabal drv (drv: { hydraPlatforms = []; });
  
    appendConfigureFlag = drv: x: overrideCabal drv (drv: { configureFlags = (drv.configureFlags or []) ++ [x]; });
    removeConfigureFlag = drv: x: overrideCabal drv (drv: { configureFlags = lib.remove x (drv.configureFlags or []); });
  
    addBuildTool = drv: x: addBuildTools drv [x];
  
negative.code:     '';
    });
  
    /* Build the package in a strict way to uncover potential problems.
       This includes buildFromSdist and failOnAllWarnings.
     */
    buildStrictly = pkg: buildFromSdist (failOnAllWarnings pkg);
  
    /* Turn on most of the compiler warnings and fail the build if any
       of them occur. */
    failOnAllWarnings = drv: appendConfigureFlag drv "--ghc-option=-Wall --ghc-option=-Werror";
  
    /* Add a post-build check to verify that dependencies declared in
       the cabal file are actually used.
  
       The first attrset argument can be used to configure the strictness
       of this check and a list of ignored package names that would otherwise 
       cause false alarms.
     */
    checkUnusedPackages =
      { ignoreEmptyImports ? false
      , ignoreMainModule   ? false
  