nixpkgs/pkgs/build-support/dotnet/build-dotnet-module/hooks/dotnet-install-hook.sh

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

50 lines
1.4 KiB
Bash
Raw Normal View History

# inherit arguments from derivation
dotnetInstallFlags=( ${dotnetInstallFlags[@]-} )
dotnetInstallHook() {
echo "Executing dotnetInstallHook"
runHook preInstall
if [ "${selfContainedBuild-}" ]; then
dotnetInstallFlags+=("--self-contained")
else
dotnetInstallFlags+=("--no-self-contained")
fi
for project in ${projectFile[@]}; do
env \
dotnet publish "$project" \
-p:ContinuousIntegrationBuild=true \
-p:Deterministic=true \
-p:UseAppHost=true \
--output "$out/lib/${pname}" \
--configuration "@buildType@" \
--no-build \
2022-04-10 22:48:41 +02:00
${dotnetInstallFlags[@]} \
${dotnetFlags[@]}
done
if [[ "${packNupkg-}" ]]; then
for project in ${projectFile[@]}; do
env \
dotnet pack "$project" \
-p:ContinuousIntegrationBuild=true \
-p:Deterministic=true \
--output "$out/share" \
--configuration "@buildType@" \
--no-build \
2022-04-10 22:48:41 +02:00
${dotnetPackFlags[@]} \
${dotnetFlags[@]}
done
fi
runHook postInstall
echo "Finished dotnetInstallHook"
}
if [[ -z "${dontDotnetInstall-}" && -z "${installPhase-}" ]]; then
installPhase=dotnetInstallHook
fi