haskell-generic-builder: fix buildTarget specification if isLibrary

If we don't pass buildTarget to ./Setup copy and buildTarget is not
empty it will try installing targets that don't exist and thus fail.
This commit is contained in:
sternenseemann 2021-06-05 12:38:24 +02:00
parent 813f25dbf9
commit 670d6ac458

View file

@ -481,7 +481,7 @@ stdenv.mkDerivation ({
# ^^ if the project is not a library, and we have a build target, then use "copy" to install
# just the target specified; "install" will error here, since not all targets have been built.
else ''
${setupCommand} copy
${setupCommand} copy ${buildTarget}
local packageConfDir="$out/lib/${ghc.name}/package.conf.d"
local packageConfFile="$packageConfDir/${pname}-${version}.conf"
mkdir -p "$packageConfDir"