anchor.diff:  # generic builder for Cabal packages
   
  -attrs :
  +{stdenv, fetchurl, lib, ghc, enableLibraryProfiling ? false, ...} :
   {
     mkDerivation =
       transform :
  
positive.code:             # all packages with haskell- to avoid name clashes for libraries;
              # if that is not desired (for applications), name can be set to
              # fname.
              name = "haskell-${self.pname}-ghc${attrs.ghc.ghc.version}-${self.version}";
  
              # the default download location for Cabal packages is Hackage,
              # you still have to specify the checksum
              src = attrs.fetchurl {
                url = "http://hackage.haskell.org/packages/archive/${self.pname}/${self.version}/${self.fname}.tar.gz";
                inherit (self) sha256;
              };
  
negative.code: 
                ensureDir $out/bin # necessary to get it added to PATH
  
                local confDir=$out/lib/ghc-pkgs/ghc-${ghc.ghc.version}
                local installedPkgConf=$confDir/${self.fname}.installedconf
                local pkgConf=$confDir/${self.fname}.conf
                ensureDir $confDir
  