aboutsummaryrefslogtreecommitdiff
path: root/scripts/nix-generate-patches.in
diff options
context:
space:
mode:
authorHydra mirror <hydra-mirror@lucifer.(none)>2012-04-04 20:46:18 +0000
committerHydra mirror <hydra-mirror@lucifer.(none)>2012-04-04 20:46:18 +0000
commit3b859ead376cb0aa6c7b27774c2d82ed3ecb370a (patch)
tree0854846c70da97fcb541093db35c57f2a3e0148b /scripts/nix-generate-patches.in
parent34ea91b25919d795b6d322059de274ddcf778763 (diff)
nix-generate-patches: Optionally write new patches to $NIX_ALL_PATCHES
Diffstat (limited to 'scripts/nix-generate-patches.in')
-rwxr-xr-xscripts/nix-generate-patches.in10
1 files changed, 10 insertions, 0 deletions
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;