diff options
author | David McFarland <corngood@gmail.com> | 2023-06-23 15:17:33 -0300 |
---|---|---|
committer | David McFarland <corngood@gmail.com> | 2023-06-24 19:13:16 -0300 |
commit | d6fa0f0a266da2287a00d98307c66f7657dd4170 (patch) | |
tree | 0f8d6a0e80de2a4fc22e3d18c127169e531febe2 | |
parent | cf9976de74326b753af0d5bfca0729b23c2d5fd1 (diff) |
buildDotnetModule: use tmp file for fetch-deps output
-rw-r--r-- | pkgs/build-support/dotnet/build-dotnet-module/default.nix | 6 |
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 { }; |