diff options
Diffstat (limited to 'nixpkgs/pkgs/build-support/dotnet/build-dotnet-module/hooks/dotnet-configure-hook.sh')
-rw-r--r-- | nixpkgs/pkgs/build-support/dotnet/build-dotnet-module/hooks/dotnet-configure-hook.sh | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/build-support/dotnet/build-dotnet-module/hooks/dotnet-configure-hook.sh b/nixpkgs/pkgs/build-support/dotnet/build-dotnet-module/hooks/dotnet-configure-hook.sh new file mode 100644 index 000000000000..59daacbac0ed --- /dev/null +++ b/nixpkgs/pkgs/build-support/dotnet/build-dotnet-module/hooks/dotnet-configure-hook.sh @@ -0,0 +1,30 @@ +declare -a projectFile testProjectFile dotnetRestoreFlags dotnetFlags + +dotnetConfigureHook() { + echo "Executing dotnetConfigureHook" + + runHook preConfigure + + if [ -z "${enableParallelBuilding-}" ]; then + parallelFlag="--disable-parallel" + fi + + for project in ${projectFile[@]} ${testProjectFile[@]}; do + env \ + dotnet restore "$project" \ + -p:ContinuousIntegrationBuild=true \ + -p:Deterministic=true \ + --source "@nugetSource@/lib" \ + ${parallelFlag-} \ + "${dotnetRestoreFlags[@]}" \ + "${dotnetFlags[@]}" + done + + runHook postConfigure + + echo "Finished dotnetConfigureHook" +} + +if [[ -z "${dontDotnetConfigure-}" && -z "${configurePhase-}" ]]; then + configurePhase=dotnetConfigureHook +fi |