anchor.diff:  
     buildStackProject = pkgs.callPackage ./generic-stack-builder.nix { };
   
  +  /* Add a dummy command to trigger a build despite an equivalent
  +     earlier build that is present in the store or cache.
  +   */
     triggerRebuild = drv: i: overrideCabal drv (drv: { postUnpack = ": trigger rebuild ${toString i}"; });
   
  +  /* Override the sources for the package and optionaly the version.
  +     This also takes of removing editedCabalFile.
  +   */
     overrideSrc = drv: { src, version ? drv.version }:
       overrideCabal drv (_: { inherit src version; editedCabalFile = null; });
   
  
positive.code:     '';
    });
  
    buildStrictly = pkg: buildFromSdist (failOnAllWarnings pkg);
  
    failOnAllWarnings = drv: appendConfigureFlag drv "--ghc-option=-Wall --ghc-option=-Werror";
  
    checkUnusedPackages =
      { ignoreEmptyImports ? false
      , ignoreMainModule   ? false
  
negative.code:     configureFlags = (drv.configureFlags or []) ++ ["--ghc-option=-optl=-dead_strip"];
    });
  
    /* Build a source distribution tarball instead of using the source files
       directly. The effect is that the package is built as if it were published
       on hackage. This can be used as a test for the source distribution,
       assuming the build fails when packaging mistakes are in the cabal file.
     */
    buildFromSdist = pkg: lib.overrideDerivation pkg (drv: {
      unpackPhase = let src = sdistTarball pkg; tarname = "${pkg.pname}-${pkg.version}"; in ''
        echo "Source tarball is at ${src}/${tarname}.tar.gz"
  