aboutsummaryrefslogtreecommitdiff
path: root/guix-build-coordinator/coordinator.scm
diff options
context:
space:
mode:
Diffstat (limited to 'guix-build-coordinator/coordinator.scm')
-rw-r--r--guix-build-coordinator/coordinator.scm13
1 files changed, 13 insertions, 0 deletions
diff --git a/guix-build-coordinator/coordinator.scm b/guix-build-coordinator/coordinator.scm
index 9e5987f..42d5600 100644
--- a/guix-build-coordinator/coordinator.scm
+++ b/guix-build-coordinator/coordinator.scm
@@ -755,6 +755,19 @@
(build-coordinator-metrics-registry build-coordinator)
"coordinator_submit_build_duration_seconds"
(lambda ()
+ (unless (derivation-path? derivation-file)
+ (raise-exception
+ (make-client-error 'invalid-derivation-file)))
+
+ (string-for-each
+ (lambda (c)
+ (unless (or (char-alphabetic? c)
+ (char-numeric? c)
+ (member c '(#\+ #\- #\. #\_ #\? #\=)))
+ (raise-exception
+ (make-client-error 'invalid-character-in-derivation-file))))
+ (store-path-base derivation-file))
+
(match (check-whether-to-store-build)
('continue
;; Store the derivation first, so that listing related derivations