From 753b30e7867237405f3bb20d43a50e1a9fdfd368 Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Thu, 7 May 2020 21:43:43 +0100 Subject: Add a hook for publishing to a S3 compatible endpoint This is helpful if you don't have local storage for nars. There's nothing special about S3 beyond it's something I wanted to be able to use. I'm hoping to support other useful ways of publishing substitutes as well. --- guix-build-coordinator/config.scm.in | 53 ++++++++++++++++-------------------- 1 file changed, 24 insertions(+), 29 deletions(-) (limited to 'guix-build-coordinator/config.scm.in') diff --git a/guix-build-coordinator/config.scm.in b/guix-build-coordinator/config.scm.in index de65835..2aa825f 100644 --- a/guix-build-coordinator/config.scm.in +++ b/guix-build-coordinator/config.scm.in @@ -23,35 +23,30 @@ %show-error-details)) (define %config - (let ((config - `((guix . "@guix@") - - (builds-dir . ,(let ((install-dir - "/var/lib/guix-build-coordinator/builds") - (dev-dir - (string-append (getcwd) "/data/builds"))) - (if (file-exists? install-dir) - install-dir - dev-dir))) - (build-logs-dir . ,(let ((install-dir - "/var/lib/guix-build-coordinator/build-logs") - (dev-dir - (string-append (getcwd) "/data/build-logs"))) - (if (file-exists? install-dir) - install-dir - dev-dir))) - - (sqitch . "@sqitch@") - (sqitch-psql . "@psql@") - (sqitch-sqlite . "@sqlite3@") - (sqitch-plan - . ,(let ((installed-plan - "@prefix@/share/guix-build-coordinator/sqitch/sqitch.plan") - (dev-plan - (string-append (getcwd) "/sqitch/sqitch.plan"))) - (if (file-exists? installed-plan) - installed-plan - dev-plan)))))) + (let* ((data-dir + (let ((install-dir + "/var/lib/guix-build-coordinator") + (dev-dir + (string-append (getcwd) "/data"))) + (if (file-exists? install-dir) + install-dir + dev-dir))) + (config + `((guix . "@guix@") + (data-dir . ,data-dir) + (builds-dir . ,(string-append data-dir "/builds")) + (build-logs-dir . ,(string-append data-dir "/build-logs")) + (sqitch . "@sqitch@") + (sqitch-psql . "@psql@") + (sqitch-sqlite . "@sqlite3@") + (sqitch-plan + . ,(let ((installed-plan + "@prefix@/share/guix-build-coordinator/sqitch/sqitch.plan") + (dev-plan + (string-append (getcwd) "/sqitch/sqitch.plan"))) + (if (file-exists? installed-plan) + installed-plan + dev-plan)))))) (lambda (key) (assoc-ref config key)))) -- cgit v1.2.3