build-dotnet-module: add useAppHost parameter so it can be disabled

+12 -1
+4
pkgs/build-support/dotnet/build-dotnet-module/default.nix
··· 71 71 , buildType ? "Release" 72 72 # If set to true, builds the application as a self-contained - removing the runtime dependency on dotnet 73 73 , selfContainedBuild ? false 74 + # Whether to explicitly enable UseAppHost when building 75 + , useAppHost ? true 74 76 # The dotnet SDK to use. 75 77 , dotnet-sdk ? dotnetCorePackages.sdk_6_0 76 78 # The dotnet runtime to use. ··· 146 148 147 149 # gappsWrapperArgs gets included when wrapping for dotnet, as to avoid double wrapping 148 150 dontWrapGApps = args.dontWrapGApps or true; 151 + 152 + inherit selfContainedBuild useAppHost; 149 153 150 154 passthru = { 151 155 inherit nuget-source;
+4 -1
pkgs/build-support/dotnet/build-dotnet-module/hooks/dotnet-build-hook.sh
··· 20 20 dotnetBuildFlags+=("-p:SelfContained=false") 21 21 fi 22 22 23 + if [ "${useAppHost-}" ]; then 24 + dotnetBuildFlags+=("-p:UseAppHost=true") 25 + fi 26 + 23 27 if [ "${version-}" ]; then 24 28 local -r versionFlag="-p:Version=${version-}" 25 29 fi ··· 31 35 -p:BuildInParallel=$parallelBuildFlag \ 32 36 -p:ContinuousIntegrationBuild=true \ 33 37 -p:Deterministic=true \ 34 - -p:UseAppHost=true \ 35 38 --configuration "@buildType@" \ 36 39 --no-restore \ 37 40 ${versionFlag-} \
+4
pkgs/build-support/dotnet/build-dotnet-module/hooks/dotnet-install-hook.sh
··· 12 12 dotnetInstallFlags+=("--no-self-contained") 13 13 fi 14 14 15 + if [ "${useAppHost-}" ]; then 16 + dotnetInstallFlags+=("-p:UseAppHost=true") 17 + fi 18 + 15 19 dotnetPublish() { 16 20 local -r project="${1-}" 17 21 env dotnet publish ${project-} \