about summary refs log tree commit diff
path: root/pkgs/build-support
diff options
context:
space:
mode:
authorDavid McFarland <corngood@gmail.com>2023-06-23 15:17:33 -0300
committerDavid McFarland <corngood@gmail.com>2023-06-24 19:13:16 -0300
commitd6fa0f0a266da2287a00d98307c66f7657dd4170 (patch)
tree0f8d6a0e80de2a4fc22e3d18c127169e531febe2 /pkgs/build-support
parentcf9976de74326b753af0d5bfca0729b23c2d5fd1 (diff)
buildDotnetModule: use tmp file for fetch-deps output
Diffstat (limited to 'pkgs/build-support')
-rw-r--r--pkgs/build-support/dotnet/build-dotnet-module/default.nix6
1 files changed, 4 insertions, 2 deletions
diff --git a/pkgs/build-support/dotnet/build-dotnet-module/default.nix b/pkgs/build-support/dotnet/build-dotnet-module/default.nix
index 16e27188671f9..4324f24eb7fbe 100644
--- a/pkgs/build-support/dotnet/build-dotnet-module/default.nix
+++ b/pkgs/build-support/dotnet/build-dotnet-module/default.nix
@@ -287,13 +287,15 @@ stdenvNoCC.mkDerivation (args // {
         echo "Succesfully restored project"
 
         echo "Writing lockfile..."
-        echo -e "# This file was automatically generated by passthru.fetch-deps.\n# Please dont edit it manually, your changes might get overwritten!\n" > "$depsFile"
 
         excluded_sources="${lib.concatStringsSep " " sdkDeps}"
         for excluded_source in ''${excluded_sources[@]}; do
           ls "$excluded_source" >> "$tmp/excluded_list"
         done
-        nuget-to-nix "$tmp/nuget_pkgs" "$tmp/excluded_list" >> "$depsFile"
+        tmpFile="$tmp"/deps.nix
+        echo -e "# This file was automatically generated by passthru.fetch-deps.\n# Please dont edit it manually, your changes might get overwritten!\n" > "$tmpFile"
+        nuget-to-nix "$tmp/nuget_pkgs" "$tmp/excluded_list" >> "$tmpFile"
+        mv "$tmpFile" "$depsFile"
         echo "Succesfully wrote lockfile to $depsFile"
       '';
   } // args.passthru or { };