1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-07 06:01:48 +02:00

Use $XDG_RUNTIME_DIR for temporary files

This commit is contained in:
Eelco Dolstra 2014-08-13 23:12:57 +02:00
parent fde819f2e2
commit 3bea429ae8
8 changed files with 16 additions and 23 deletions

View file

@ -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;