diff options
author | github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> | 2022-07-28 12:02:23 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-28 12:02:23 +0000 |
commit | 437247fc43214bb3c33f2e8f612cdbc206236a97 (patch) | |
tree | 9173ddae081be5f05a4f83958a86229098b9a800 /pkgs/build-support | |
parent | a802ad3445129b7ace80ee0d1f930e6c2081f13f (diff) | |
parent | 0d7024ccd8ee71ef31b23c724b1d3d197c533015 (diff) |
Merge staging-next into staging
Diffstat (limited to 'pkgs/build-support')
5 files changed, 20 insertions, 3 deletions
diff --git a/pkgs/build-support/dotnet/build-dotnet-module/default.nix b/pkgs/build-support/dotnet/build-dotnet-module/default.nix index 15fe5a2c5d417..339eac16b0b2d 100644 --- a/pkgs/build-support/dotnet/build-dotnet-module/default.nix +++ b/pkgs/build-support/dotnet/build-dotnet-module/default.nix @@ -55,6 +55,8 @@ # The type of build to perform. This is passed to `dotnet` with the `--configuration` flag. Possible values are `Release`, `Debug`, etc. , buildType ? "Release" +# If set to true, builds the application as a self-contained - removing the runtime dependency on dotnet +, selfContainedBuild ? false # The dotnet SDK to use. , dotnet-sdk ? dotnetCorePackages.sdk_6_0 # The dotnet runtime to use. diff --git a/pkgs/build-support/dotnet/build-dotnet-module/hooks/dotnet-build-hook.sh b/pkgs/build-support/dotnet/build-dotnet-module/hooks/dotnet-build-hook.sh index 5a5ece6d99756..a8a830195eaa8 100644 --- a/pkgs/build-support/dotnet/build-dotnet-module/hooks/dotnet-build-hook.sh +++ b/pkgs/build-support/dotnet/build-dotnet-module/hooks/dotnet-build-hook.sh @@ -14,6 +14,12 @@ dotnetBuildHook() { parallelBuildFlag="false" fi + if [ "${selfContainedBuild-}" ]; then + dotnetBuildFlags+=("--self-contained") + else + dotnetBuildFlags+=("--no-self-contained") + fi + if [ "${version-}" ]; then versionFlag="-p:Version=${version-}" fi diff --git a/pkgs/build-support/dotnet/build-dotnet-module/hooks/dotnet-fixup-hook.sh b/pkgs/build-support/dotnet/build-dotnet-module/hooks/dotnet-fixup-hook.sh index 675006508f6c7..0a881fae9cfa1 100644 --- a/pkgs/build-support/dotnet/build-dotnet-module/hooks/dotnet-fixup-hook.sh +++ b/pkgs/build-support/dotnet/build-dotnet-module/hooks/dotnet-fixup-hook.sh @@ -4,8 +4,12 @@ makeWrapperArgs=( ${makeWrapperArgs-} ) # First argument is the executable you want to wrap, # the second is the destination for the wrapper. wrapDotnetProgram() { + if [ ! "${selfContainedBuild-}" ]; then + dotnetRootFlag=("--set" "DOTNET_ROOT" "@dotnetRuntime@") + fi + makeWrapper "$1" "$2" \ - --set "DOTNET_ROOT" "@dotnetRuntime@" \ + "${dotnetRootFlag[@]}" \ --suffix "LD_LIBRARY_PATH" : "@runtimeDeps@" \ "${gappsWrapperArgs[@]}" \ "${makeWrapperArgs[@]}" diff --git a/pkgs/build-support/dotnet/build-dotnet-module/hooks/dotnet-install-hook.sh b/pkgs/build-support/dotnet/build-dotnet-module/hooks/dotnet-install-hook.sh index 7984c5ebd3ccb..fd88ea32ec042 100644 --- a/pkgs/build-support/dotnet/build-dotnet-module/hooks/dotnet-install-hook.sh +++ b/pkgs/build-support/dotnet/build-dotnet-module/hooks/dotnet-install-hook.sh @@ -6,6 +6,12 @@ dotnetInstallHook() { runHook preInstall + if [ "${selfContainedBuild-}" ]; then + dotnetInstallFlags+=("--self-contained") + else + dotnetInstallFlags+=("--no-self-contained") + fi + for project in ${projectFile[@]}; do env \ dotnet publish "$project" \ @@ -15,7 +21,6 @@ dotnetInstallHook() { --output "$out/lib/${pname}" \ --configuration "@buildType@" \ --no-build \ - --no-self-contained \ ${dotnetInstallFlags[@]} \ ${dotnetFlags[@]} done diff --git a/pkgs/build-support/fetchnextcloudapp/default.nix b/pkgs/build-support/fetchnextcloudapp/default.nix index 094228ad3aabc..1997c80c8a153 100644 --- a/pkgs/build-support/fetchnextcloudapp/default.nix +++ b/pkgs/build-support/fetchnextcloudapp/default.nix @@ -6,7 +6,7 @@ , patches ? [ ] }: stdenv.mkDerivation { - name = "nc-app-${name}"; + pname = "nc-app-${name}"; inherit version patches; src = fetchurl { |