summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRaphael Robatsch <raphael-git@tapesoftware.net>2023-05-25 11:49:10 +0200
committergithub-actions[bot] <github-actions[bot]@users.noreply.github.com>2023-06-14 18:12:41 +0000
commiteac0641ae6dba32d844346e1f8a1dbe7744b7710 (patch)
tree41fc0152aeae99c288641b24e67ed3766bcd816d
parenttests.dotnet: init with test for projectReferences (diff)
downloadnixpkgs-origin/backport-234235-to-release-23.05.tar.gz
mkNugetSource: Also copy .nupkg files from subdirectoriesorigin/backport-234235-to-release-23.05
Previously only .nupkg files directly in the deps directory were copied. This is a regression because it breaks `projectReferences = [ ... ];` in buildDotnetModule. (cherry picked from commit 0d2981488007617e666959b55e43fb1b2c2409f8)
-rw-r--r--pkgs/build-support/dotnet/make-nuget-source/default.nix10
1 files changed, 4 insertions, 6 deletions
diff --git a/pkgs/build-support/dotnet/make-nuget-source/default.nix b/pkgs/build-support/dotnet/make-nuget-source/default.nix
index 6bda65f18d58..a23a143ab246 100644
--- a/pkgs/build-support/dotnet/make-nuget-source/default.nix
+++ b/pkgs/build-support/dotnet/make-nuget-source/default.nix
@@ -15,12 +15,10 @@ let
buildCommand = ''
mkdir -p $out/{lib,share}
- (
- shopt -s nullglob
- for nupkg in ${lib.concatMapStringsSep " " (dep: "\"${dep}\"/*.nupkg") deps}; do
- cp --no-clobber "$nupkg" $out/lib
- done
- )
+ # use -L to follow symbolic links. When `projectReferences` is used in
+ # buildDotnetModule, one of the deps will be a symlink farm.
+ find -L ${lib.concatStringsSep " " deps} -type f -name '*.nupkg' -exec \
+ cp --no-clobber '{}' $out/lib ';'
# Generates a list of all licenses' spdx ids, if available.
# Note that this currently ignores any license provided in plain text (e.g. "LICENSE.txt")