about summary refs log tree commit diff
path: root/scripts/generate-patches.pl.in
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2007-03-30T09·01+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2007-03-30T09·01+0000
commit4caca58ff7cc2edae110a11b9c47d14fea345eca (patch)
treea6403abd47c267c63206ab728e2635a87c7344b2 /scripts/generate-patches.pl.in
parent17b506c0c7a927da1befc62100c5354e4b3147f6 (diff)
* Make the maximum patch size configurable.
Diffstat (limited to 'scripts/generate-patches.pl.in')
-rwxr-xr-xscripts/generate-patches.pl.in12
1 files changed, 9 insertions, 3 deletions
diff --git a/scripts/generate-patches.pl.in b/scripts/generate-patches.pl.in
index 9a5c3423f206..148b7d81f120 100755
--- a/scripts/generate-patches.pl.in
+++ b/scripts/generate-patches.pl.in
@@ -5,9 +5,15 @@ use File::Temp qw(tempdir);
 use readmanifest;
 
 
-# Some hard-coded options.
-my $maxNarSize = 100 * 1024 * 1024; # max size of NAR archives to generate patches for
-my $maxPatchFraction = 0.60; # if patch is bigger than this fraction of full archive, reject
+# Some patch generations options.
+
+# Max size of NAR archives to generate patches for.
+my $maxNarSize = $ENV{"NIX_MAX_NAR_SIZE"};
+$maxNarSize = 100 * 1024 * 1024 if !defined $maxNarSize;
+
+# If patch is bigger than this fraction of full archive, reject.
+my $maxPatchFraction = $ENV{"NIX_PATCH_FRACTION"};
+$maxPatchFraction = 0.60 if !defined $maxPatchFraction;
 
 
 die unless scalar @ARGV == 5;