mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-25 08:23:09 +00:00
buildDotnetModule: allow selfContainedBuild property to be omitted with null
Fixes #351892
This commit is contained in:
parent
bcd669f23f
commit
5b462ef57a
@ -27,11 +27,13 @@ dotnetBuildHook() {
|
||||
local -r parallelBuildFlag="false"
|
||||
fi
|
||||
|
||||
if [[ -n ${dotnetSelfContainedBuild-} ]]; then
|
||||
if [[ -v dotnetSelfContainedBuild ]]; then
|
||||
if [[ -n $dotnetSelfContainedBuild ]]; then
|
||||
dotnetBuildFlagsArray+=("-p:SelfContained=true")
|
||||
else
|
||||
dotnetBuildFlagsArray+=("-p:SelfContained=false")
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ -n ${dotnetUseAppHost-} ]]; then
|
||||
dotnetBuildFlagsArray+=("-p:UseAppHost=true")
|
||||
|
@ -24,11 +24,13 @@ dotnetConfigureHook() {
|
||||
local -r parallelFlag="--disable-parallel"
|
||||
fi
|
||||
|
||||
if [[ -n ${dotnetSelfContainedBuild-} ]]; then
|
||||
if [[ -v dotnetSelfContainedBuild ]]; then
|
||||
if [[ -n $dotnetSelfContainedBuild ]]; then
|
||||
dotnetRestoreFlagsArray+=("-p:SelfContained=true")
|
||||
else
|
||||
dotnetRestoreFlagsArray+=("-p:SelfContained=false")
|
||||
fi
|
||||
fi
|
||||
|
||||
dotnetRestore() {
|
||||
local -r projectFile="${1-}"
|
||||
|
@ -20,7 +20,8 @@ dotnetInstallHook() {
|
||||
local dotnetRuntimeIdsArray=($dotnetRuntimeIds)
|
||||
fi
|
||||
|
||||
if [[ -n ${dotnetSelfContainedBuild-} ]]; then
|
||||
if [[ -v dotnetSelfContainedBuild ]]; then
|
||||
if [[ -n $dotnetSelfContainedBuild ]]; then
|
||||
dotnetInstallFlagsArray+=("--self-contained")
|
||||
else
|
||||
dotnetInstallFlagsArray+=("--no-self-contained")
|
||||
@ -28,6 +29,7 @@ dotnetInstallHook() {
|
||||
# Trimming is only available for self-contained build, so force disable it here
|
||||
dotnetInstallFlagsArray+=("-p:PublishTrimmed=false")
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ -n ${dotnetUseAppHost-} ]]; then
|
||||
dotnetInstallFlagsArray+=("-p:UseAppHost=true")
|
||||
|
Loading…
Reference in New Issue
Block a user