Add haskell.lib.setBuiltTarget, and support non library compiling of a single target
This commit is contained in:
committed by
(cdep)illabout
parent
111151c4bc
commit
d725ac7942
@@ -464,7 +464,12 @@ stdenv.mkDerivation ({
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
${if !isLibrary then "${setupCommand} install" else ''
|
||||
${if !isLibrary && buildTarget == "" then "${setupCommand} install"
|
||||
# ^^ if the project is not a library, and no build target is specified, we can just use "install".
|
||||
else if !isLibrary then "${setupCommand} copy ${buildTarget}"
|
||||
# ^^ 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
|
||||
local packageConfDir="$out/lib/${ghc.name}/package.conf.d"
|
||||
local packageConfFile="$packageConfDir/${pname}-${version}.conf"
|
||||
|
||||
Reference in New Issue
Block a user