mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 06:53:01 +00:00
buildDotnetModule: allow selfContainedBuild property to be omitted with null
Fixes #351892
This commit is contained in:
parent
bcd669f23f
commit
5b462ef57a
@ -27,10 +27,12 @@ dotnetBuildHook() {
|
|||||||
local -r parallelBuildFlag="false"
|
local -r parallelBuildFlag="false"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -n ${dotnetSelfContainedBuild-} ]]; then
|
if [[ -v dotnetSelfContainedBuild ]]; then
|
||||||
dotnetBuildFlagsArray+=("-p:SelfContained=true")
|
if [[ -n $dotnetSelfContainedBuild ]]; then
|
||||||
else
|
dotnetBuildFlagsArray+=("-p:SelfContained=true")
|
||||||
dotnetBuildFlagsArray+=("-p:SelfContained=false")
|
else
|
||||||
|
dotnetBuildFlagsArray+=("-p:SelfContained=false")
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -n ${dotnetUseAppHost-} ]]; then
|
if [[ -n ${dotnetUseAppHost-} ]]; then
|
||||||
|
@ -24,10 +24,12 @@ dotnetConfigureHook() {
|
|||||||
local -r parallelFlag="--disable-parallel"
|
local -r parallelFlag="--disable-parallel"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -n ${dotnetSelfContainedBuild-} ]]; then
|
if [[ -v dotnetSelfContainedBuild ]]; then
|
||||||
dotnetRestoreFlagsArray+=("-p:SelfContained=true")
|
if [[ -n $dotnetSelfContainedBuild ]]; then
|
||||||
else
|
dotnetRestoreFlagsArray+=("-p:SelfContained=true")
|
||||||
dotnetRestoreFlagsArray+=("-p:SelfContained=false")
|
else
|
||||||
|
dotnetRestoreFlagsArray+=("-p:SelfContained=false")
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
dotnetRestore() {
|
dotnetRestore() {
|
||||||
|
@ -20,13 +20,15 @@ dotnetInstallHook() {
|
|||||||
local dotnetRuntimeIdsArray=($dotnetRuntimeIds)
|
local dotnetRuntimeIdsArray=($dotnetRuntimeIds)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -n ${dotnetSelfContainedBuild-} ]]; then
|
if [[ -v dotnetSelfContainedBuild ]]; then
|
||||||
dotnetInstallFlagsArray+=("--self-contained")
|
if [[ -n $dotnetSelfContainedBuild ]]; then
|
||||||
else
|
dotnetInstallFlagsArray+=("--self-contained")
|
||||||
dotnetInstallFlagsArray+=("--no-self-contained")
|
else
|
||||||
# https://learn.microsoft.com/en-us/dotnet/core/deploying/trimming/trim-self-contained
|
dotnetInstallFlagsArray+=("--no-self-contained")
|
||||||
# Trimming is only available for self-contained build, so force disable it here
|
# https://learn.microsoft.com/en-us/dotnet/core/deploying/trimming/trim-self-contained
|
||||||
dotnetInstallFlagsArray+=("-p:PublishTrimmed=false")
|
# Trimming is only available for self-contained build, so force disable it here
|
||||||
|
dotnetInstallFlagsArray+=("-p:PublishTrimmed=false")
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -n ${dotnetUseAppHost-} ]]; then
|
if [[ -n ${dotnetUseAppHost-} ]]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user