haskell-generic-builder: bake the package name and version into --docdir

If we use a --docdir that's not specific to the package, then different builds
will install their license files into the same location, which leads to file
collisions if those are ever joined into the same environment.

Fixes https://github.com/NixOS/nixpkgs/issues/35024.
This commit is contained in:
Peter Simons 2018-06-22 12:50:54 +02:00
parent 1486fee1d3
commit 5c80983e75

View File

@ -98,7 +98,7 @@ let
else "package-conf";
# the target dir for haddock documentation
docdir = docoutput: docoutput + "/share/doc";
docdir = docoutput: docoutput + "/share/doc/" + pname + "-" + version;
newCabalFileUrl = "http://hackage.haskell.org/package/${pname}-${version}/revision/${revision}.cabal";
newCabalFile = fetchurl {