build-dotnet-module: add useAppHost parameter so it can be disabled
This commit is contained in:
parent
62ecb39a1f
commit
4c861dd26c
3 changed files with 12 additions and 1 deletions
|
@ -71,6 +71,8 @@
|
|||
, buildType ? "Release"
|
||||
# If set to true, builds the application as a self-contained - removing the runtime dependency on dotnet
|
||||
, selfContainedBuild ? false
|
||||
# Whether to explicitly enable UseAppHost when building
|
||||
, useAppHost ? true
|
||||
# The dotnet SDK to use.
|
||||
, dotnet-sdk ? dotnetCorePackages.sdk_6_0
|
||||
# The dotnet runtime to use.
|
||||
|
@ -147,6 +149,8 @@ stdenvNoCC.mkDerivation (args // {
|
|||
# gappsWrapperArgs gets included when wrapping for dotnet, as to avoid double wrapping
|
||||
dontWrapGApps = args.dontWrapGApps or true;
|
||||
|
||||
inherit selfContainedBuild useAppHost;
|
||||
|
||||
passthru = {
|
||||
inherit nuget-source;
|
||||
|
||||
|
|
|
@ -20,6 +20,10 @@ dotnetBuildHook() {
|
|||
dotnetBuildFlags+=("-p:SelfContained=false")
|
||||
fi
|
||||
|
||||
if [ "${useAppHost-}" ]; then
|
||||
dotnetBuildFlags+=("-p:UseAppHost=true")
|
||||
fi
|
||||
|
||||
if [ "${version-}" ]; then
|
||||
local -r versionFlag="-p:Version=${version-}"
|
||||
fi
|
||||
|
@ -31,7 +35,6 @@ dotnetBuildHook() {
|
|||
-p:BuildInParallel=$parallelBuildFlag \
|
||||
-p:ContinuousIntegrationBuild=true \
|
||||
-p:Deterministic=true \
|
||||
-p:UseAppHost=true \
|
||||
--configuration "@buildType@" \
|
||||
--no-restore \
|
||||
${versionFlag-} \
|
||||
|
|
|
@ -12,6 +12,10 @@ dotnetInstallHook() {
|
|||
dotnetInstallFlags+=("--no-self-contained")
|
||||
fi
|
||||
|
||||
if [ "${useAppHost-}" ]; then
|
||||
dotnetInstallFlags+=("-p:UseAppHost=true")
|
||||
fi
|
||||
|
||||
dotnetPublish() {
|
||||
local -r project="${1-}"
|
||||
env dotnet publish ${project-} \
|
||||
|
|
Loading…
Reference in a new issue