From 3b859ead376cb0aa6c7b27774c2d82ed3ecb370a Mon Sep 17 00:00:00 2001 From: Hydra mirror Date: Wed, 4 Apr 2012 20:46:18 +0000 Subject: [PATCH] nix-generate-patches: Optionally write new patches to $NIX_ALL_PATCHES --- scripts/nix-generate-patches.in | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/scripts/nix-generate-patches.in b/scripts/nix-generate-patches.in index 4cb843382..969af916d 100755 --- a/scripts/nix-generate-patches.in +++ b/scripts/nix-generate-patches.in @@ -39,4 +39,14 @@ generatePatches \%srcNarFiles, \%dstNarFiles, \%srcPatches, \%dstPatches, 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;