#! @perl@ -w @perlFlags@ use strict; use File::Temp qw(tempdir); use Nix::Manifest; use Nix::GeneratePatches; if (scalar @ARGV != 5) { print STDERR < 1, TMPDIR => 1) or die "cannot create a temporary directory"; generatePatches \%srcNarFiles, \%dstNarFiles, \%srcPatches, \%dstPatches, $narPath, $patchesPath, $patchesURL, $tmpDir; propagatePatches \%srcPatches, \%dstNarFiles, \%dstPatches; # Optionally add all new patches to the manifest in $NIX_ALL_PATCHES. my $allPatchesFile = $ENV{"NIX_ALL_PATCHES"}; if (defined $allPatchesFile) { my (%dummy, %allPatches); readManifest("$patchesPath/all-patches", \%dummy, \%allPatches) if -f $allPatchesFile; copyPatches \%dstPatches, \%allPatches; writeManifest($allPatchesFile, {}, \%allPatches, 0); } writeManifest $dstManifest, \%dstNarFiles, \%dstPatches;