about summary refs log tree commit diff
path: root/scripts/nix-generate-patches.in
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/nix-generate-patches.in')
-rwxr-xr-xscripts/nix-generate-patches.in5
1 files changed, 2 insertions, 3 deletions
diff --git a/scripts/nix-generate-patches.in b/scripts/nix-generate-patches.in
index 969af916d8e6..0a29c0548c1f 100755
--- a/scripts/nix-generate-patches.in
+++ b/scripts/nix-generate-patches.in
@@ -1,9 +1,9 @@
 #! @perl@ -w @perlFlags@
 
 use strict;
-use File::Temp qw(tempdir);
 use Nix::Manifest;
 use Nix::GeneratePatches;
+use Nix::Utils;
 
 if (scalar @ARGV != 5) {
     print STDERR <<EOF;
@@ -31,8 +31,7 @@ readManifest $srcManifest, \%srcNarFiles, \%srcPatches;
 my (%dstNarFiles, %dstLocalPaths, %dstPatches);
 readManifest $dstManifest, \%dstNarFiles, \%dstPatches;
 
-my $tmpDir = tempdir("nix-generate-patches.XXXXXX", CLEANUP => 1, TMPDIR => 1)
-    or die "cannot create a temporary directory";
+my $tmpDir = mkTempDir("nix-generate-patches");
 
 generatePatches \%srcNarFiles, \%dstNarFiles, \%srcPatches, \%dstPatches,
     $narPath, $patchesPath, $patchesURL, $tmpDir;