aboutsummaryrefslogtreecommitdiff
path: root/guix-build-coordinator
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2024-05-26 21:36:51 +0100
committerChristopher Baines <mail@cbaines.net>2024-06-05 15:25:06 +0100
commit6087e86d484778fe2d1d62899c9acec25a433ca2 (patch)
tree7790d2d445a05e23768b511bc4ac0506ba6a3b5c /guix-build-coordinator
parent1ecad692a75402872b7b366859f364a421727925 (diff)
downloadbuild-coordinator-6087e86d484778fe2d1d62899c9acec25a433ca2.tar
build-coordinator-6087e86d484778fe2d1d62899c9acec25a433ca2.tar.gz
Omit none as a compression in narinfos
To match the guix publish behaviour.
Diffstat (limited to 'guix-build-coordinator')
-rw-r--r--guix-build-coordinator/hooks.scm14
-rw-r--r--guix-build-coordinator/utils.scm6
2 files changed, 15 insertions, 5 deletions
diff --git a/guix-build-coordinator/hooks.scm b/guix-build-coordinator/hooks.scm
index 50c2445..b2f6f6c 100644
--- a/guix-build-coordinator/hooks.scm
+++ b/guix-build-coordinator/hooks.scm
@@ -280,10 +280,15 @@
(if (pair? compression)
(car compression)
compression))
+ ;; TODO This logic should sit elsewhere
(nar-destination
(string-append
publish-directory "/"
- "nar/" (symbol->string target-compression) "/"
+ "nar/"
+ (if (eq? compression 'none)
+ ""
+ (string-append
+ (symbol->string target-compression) "/"))
(basename output-filename)))
(temporary-destination
(string-append nar-destination ".tmp")))
@@ -336,9 +341,14 @@
(if (pair? compression-details)
(car compression-details)
compression-details))
+ ;; TODO This logic should sit elsewhere
(file (string-append
publish-directory "/"
- "nar/" (symbol->string compression) "/"
+ "nar/"
+ (if (eq? compression 'none)
+ ""
+ (string-append
+ (symbol->string compression) "/"))
(basename output-filename))))
(list compression (stat:size (stat file #f)))))
compressions)
diff --git a/guix-build-coordinator/utils.scm b/guix-build-coordinator/utils.scm
index 0acd62a..0a3383c 100644
--- a/guix-build-coordinator/utils.scm
+++ b/guix-build-coordinator/utils.scm
@@ -567,9 +567,9 @@
(define* (store-item->recutils compression file-size)
(let ((url (encode-and-join-uri-path
`(,@(split-and-decode-uri-path nar-path)
- ,@(if compression
- (list (symbol->string compression))
- '())
+ ,@(if (eq? compression 'none)
+ '()
+ (list (symbol->string compression)))
,(basename store-path)))))
(format #f "URL: ~a~%Compression: ~a~%~@[FileSize: ~a~%~]"
url