Merge pull request #191520 from cole-h/fixup-temp-naming

build-dotnet-module/fetch-deps: fixup temp naming when pname has a ca…
This commit is contained in:
Ivv 2022-09-16 19:06:33 +02:00 committed by GitHub
commit 3ad98fc938
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -180,12 +180,12 @@ in stdenvNoCC.mkDerivation (args // {
;;
esac
deps_file="$(realpath "''${1:-$(mktemp -t "XXXXXX-${pname}-deps.nix")}")"
export HOME=$(mktemp -td "XXXXXX-${pname}-home")
deps_file="$(realpath "''${1:-$(mktemp -t "${pname}-deps-XXXXXX.nix")}")"
export HOME=$(mktemp -td "${pname}-home-XXXXXX")
mkdir -p "$HOME/nuget_pkgs"
store_src="${srcOnly args}"
src="$(mktemp -td "XXXXXX-${pname}-src")"
src="$(mktemp -td "${pname}-src-XXXXXX")"
cp -rT "$store_src" "$src"
chmod -R +w "$src"
trap "rm -rf $src $HOME" EXIT