about summary refs log tree commit diff
path: root/pkgs/build-support
diff options
context:
space:
mode:
authorRyan Lahfa <masterancpp@gmail.com>2024-01-12 19:30:12 +0100
committerGitHub <noreply@github.com>2024-01-12 19:30:12 +0100
commitd74aefe80eda17461c97d06f12b6f061d7d28081 (patch)
treef6a463d176e7877f5e10200e3ff5fe38da07a69e /pkgs/build-support
parent98426e81f4e2b8446c9ccb1fca584adb2c6a804b (diff)
parent20e1dd2d1e29c8a771fe0f73ce8c13cc952265fb (diff)
downloadnixlib-d74aefe80eda17461c97d06f12b6f061d7d28081.tar
nixlib-d74aefe80eda17461c97d06f12b6f061d7d28081.tar.gz
nixlib-d74aefe80eda17461c97d06f12b6f061d7d28081.tar.bz2
nixlib-d74aefe80eda17461c97d06f12b6f061d7d28081.tar.lz
nixlib-d74aefe80eda17461c97d06f12b6f061d7d28081.tar.xz
nixlib-d74aefe80eda17461c97d06f12b6f061d7d28081.tar.zst
nixlib-d74aefe80eda17461c97d06f12b6f061d7d28081.zip
Merge pull request #251267 from lilyinstarlight/fix/dotnet-installPath
buildDotnetModule: actually use installPath
Diffstat (limited to 'pkgs/build-support')
-rw-r--r--pkgs/build-support/dotnet/build-dotnet-module/default.nix2
-rw-r--r--pkgs/build-support/dotnet/build-dotnet-module/hooks/dotnet-fixup-hook.sh4
-rw-r--r--pkgs/build-support/dotnet/build-dotnet-module/hooks/dotnet-install-hook.sh2
3 files changed, 4 insertions, 4 deletions
diff --git a/pkgs/build-support/dotnet/build-dotnet-module/default.nix b/pkgs/build-support/dotnet/build-dotnet-module/default.nix
index 573b270ee408..af960fb1d617 100644
--- a/pkgs/build-support/dotnet/build-dotnet-module/default.nix
+++ b/pkgs/build-support/dotnet/build-dotnet-module/default.nix
@@ -37,7 +37,7 @@
 
   # The path to publish the project to. When unset, the directory "$out/lib/$pname" is used.
 , installPath ? null
-  # The binaries that should get installed to `$out/bin`, relative to `$out/lib/$pname/`. These get wrapped accordingly.
+  # The binaries that should get installed to `$out/bin`, relative to `$installPath/`. These get wrapped accordingly.
   # Unfortunately, dotnet has no method for doing this automatically.
   # If unset, all executables in the projects root will get installed. This may cause bloat!
 , executables ? null
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 4fec939bed33..97dd15c17dcf 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
@@ -32,7 +32,7 @@ dotnetFixupHook() {
 
     if [ "${executables-}" ]; then
         for executable in ${executables[@]}; do
-            path="$out/lib/$pname/$executable"
+            path="${installPath-$out/lib/$pname}/$executable"
 
             if test -x "$path"; then
                 wrapDotnetProgram "$path" "$out/bin/$(basename "$executable")"
@@ -45,7 +45,7 @@ dotnetFixupHook() {
     else
         while IFS= read -d '' executable; do
             wrapDotnetProgram "$executable" "$out/bin/$(basename "$executable")" \;
-        done < <(find "$out/lib/$pname" ! -name "*.dll" -executable -type f -print0)
+        done < <(find "${installPath-$out/lib/$pname}" ! -name "*.dll" -executable -type f -print0)
     fi
 
     echo "Finished dotnetFixupPhase"
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 3f2a89c41404..d832eac28809 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
@@ -30,7 +30,7 @@ dotnetInstallHook() {
         env dotnet publish ${project-} \
             -p:ContinuousIntegrationBuild=true \
             -p:Deterministic=true \
-            --output "$out/lib/${pname}" \
+            --output "${installPath-$out/lib/$pname}" \
             --configuration "@buildType@" \
             --no-build \
             ${runtimeIdFlags[@]} \