import: crate: Make it clearer when a crate has been yanked.

* guix/import/crate.scm (make-crate-sexp): If a crate has been yanked
then adjust the returned package's source file-name with 'yanked' as
part of the name.

Change-Id: Ib3d16ff2e89a75a7a0755c1f336abadba0189666
This commit is contained in:
Efraim Flashner 2024-12-02 20:49:30 +02:00
parent 3f1b5003cc
commit 67950f46ef
No known key found for this signature in database
GPG key ID: 41AAE7DCCA3D8351

View file

@ -214,7 +214,10 @@ and LICENSE."
(source (origin
(method url-fetch)
(uri (crate-uri ,name version))
(file-name (string-append name "-" version ".tar.gz"))
(file-name
,@(if yanked?
`((string-append name "-" version "-yanked.tar.gz"))
`((string-append name "-" version ".tar.gz"))))
(sha256
(base32
,(bytevector->nix-base32-string (port-sha256 port))))))