aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2023-02-01 13:35:58 +0000
committerChristopher Baines <mail@cbaines.net>2023-02-01 13:35:58 +0000
commit977fbd0ae63419c5733c8e31f673a3b4610a398c (patch)
tree70730f53cce2da8e1d1cdf97fe8b21337a728dcc /scripts
parent6ba33a02330a040c04ebef4f6b598925403a2cd9 (diff)
downloadnar-herder-977fbd0ae63419c5733c8e31f673a3b4610a398c.tar
nar-herder-977fbd0ae63419c5733c8e31f673a3b4610a398c.tar.gz
Be more flexible with cached compressions
Allow specifying where to fetch the source files from, enabling cached compressions for mirrors.
Diffstat (limited to 'scripts')
-rw-r--r--scripts/nar-herder.in10
1 files changed, 9 insertions, 1 deletions
diff --git a/scripts/nar-herder.in b/scripts/nar-herder.in
index e62f60f..f278ac2 100644
--- a/scripts/nar-herder.in
+++ b/scripts/nar-herder.in
@@ -182,6 +182,13 @@
(string->number arg)
result)))
+ (option '("cached-compression-nar-source") #t #f
+ (lambda (opt name arg result)
+ (alist-cons 'cached-compression-nar-source
+ arg
+ (alist-delete 'cached-compression-nar-source
+ result))))
+
(option '("ttl") #t #f
(lambda (opt name arg result)
(let ((duration (string->duration arg)))
@@ -478,7 +485,8 @@
#f
(make-maybe-trigger-creation-of-compressed-nars
database
- canonical-storage
+ (or (assq-ref opts 'cached-compression-nar-source)
+ canonical-storage)
enabled-cached-compressions
cached-compression-min-uses
#:cached-compression-workers