diff options
author | Christopher Baines <mail@cbaines.net> | 2022-02-04 09:19:54 +0000 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2022-02-04 09:19:54 +0000 |
commit | c5c1ff9fc8dcb24003569c0a37dcda6fcd1fbee2 (patch) | |
tree | 3c78795c3cfd84ec3e9ba92177115ec54d179062 /guix-build-coordinator | |
parent | 4dec6885f15047844d1585685906173a677de107 (diff) | |
download | build-coordinator-c5c1ff9fc8dcb24003569c0a37dcda6fcd1fbee2.tar build-coordinator-c5c1ff9fc8dcb24003569c0a37dcda6fcd1fbee2.tar.gz |
Allow overriding the success publish hook skip publishing behaviour
This means that when using the nar-herder, you can get it to check for the
presence of the nar in the database, rather than relying on the narinfo on the
disk.
Diffstat (limited to 'guix-build-coordinator')
-rw-r--r-- | guix-build-coordinator/hooks.scm | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/guix-build-coordinator/hooks.scm b/guix-build-coordinator/hooks.scm index c2c5008..2053e90 100644 --- a/guix-build-coordinator/hooks.scm +++ b/guix-build-coordinator/hooks.scm @@ -82,6 +82,10 @@ (public-key (read-file-sexp %public-key-file)) (private-key (read-file-sexp %private-key-file)) (narinfo-directory publish-directory) + (skip-publishing-proc + (lambda (narinfo-filename narinfo-directory) + (file-exists? (string-append + narinfo-directory "/" narinfo-filename)))) post-publish-hook) (mkdir-p (string-append publish-directory "/nar/lzip")) @@ -116,7 +120,7 @@ (string-append narinfo-directory "/" narinfo-filename))) - (unless (file-exists? narinfo-location) + (unless (skip-publishing-proc narinfo-filename narinfo-directory) (copy-file nar-location nar-destination) (call-with-output-file narinfo-location |