build-system/julia: Detect and report failure to compute “slug”.

* guix/build/julia-build-system.scm (link-depot): Call ‘close-pipe’ and
raise an error when it returns a non-zero status.

Change-Id: I2dc63bfeebf2b290f42ddc2ab23af877ac1c85d0
This commit is contained in:
Ludovic Courtès 2025-01-08 10:14:57 +01:00
parent 816f89f6d0
commit e1b87bd651
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5

View file

@ -153,7 +153,11 @@ (define* (link-depot #:key source inputs outputs
Base.SHA1(Pkg.GitTools.tree_hash(\".\"))))" uuid)))
(slug (string-trim-right (get-string-all pipe))))
;; Few packages do not have the regular Project.toml file, then when they
;; are propagated, dependencies do not find them and an raise error.
;; are propagated, dependencies do not find them and an error is raised.
(let ((status (close-pipe pipe)))
(unless (zero? status)
(error "failed to compute package slug" status)))
(unless (file-exists? "Project.toml")
(julia-create-package-toml (getcwd)
julia-package-name julia-package-uuid