anchor.diff:      cp --force ${cabalFile} ${name}.cabal
     '';
   
  +  src = runCommand "${name}-src" {} ''
  +    cp --recursive --no-preserve=mode ${./.} $out
  +    (cd $out && ${preConfigure})
  +  '';
  +
   in haskellPackages.mkDerivation {
   
  +  inherit src;
     pname = name;
     isExecutable = lib.hasAttr "executables" spec;
     isLibrary = lib.hasAttr "library" spec;
     license = lib.licenses.mpl20;
  -  src = ./.;
     version = spec.version or "0.0.0";
   
     executableHaskellDepends = map (d: haskellPackages.${d}) spec.dependencies;
  
positive.code:     }) spec.tests;
    };
    hpack = lib.recursiveUpdate spec hpackDependencies;
  
    hpackFile = builtins.toFile "package.yaml" (builtins.toJSON hpack);
    cabalFile = runCommand "${name}.cabal" {} ''
      cp ${hpackFile} package.yaml
      ${haskellPackages.hpack}/bin/hpack
      mv ${name}.cabal $out
    '';
  
    # Symlinking won't work because GitLab CI doesn't resolve symlinks when
  
negative.code:   ) (lib.concatLists (lib.mapAttrsToList (_: t: t.dependencies) spec.tests));
  
    preConfigure = ''
      ${copyCabalFile}
    '';
  
  