summary refs log tree commit diff
path: root/pkgs/build-support/dotnet/make-nuget-source/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/build-support/dotnet/make-nuget-source/default.nix')
-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 6bda65f18d5..a23a143ab24 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")