build: cargo-build-system: Strip enough prefix in package.

* guix/build/cargo-build-system.scm (package): When using the source as
the packaged crate also strip the 'rust-' prefix.
This commit is contained in:
Efraim Flashner 2023-10-04 16:06:42 +03:00
parent fafbad0ce2
commit 163592c843
No known key found for this signature in database
GPG Key ID: 41AAE7DCCA3D8351
1 changed files with 2 additions and 2 deletions

View File

@ -231,10 +231,10 @@ directory = '" port)
(for-each
(lambda (file)
(make-file-writable file)
;; Strip the hash and replace '.tar.gz' with '.crate'.
;; Strip the hash and rust prefix and replace '.tar.gz' with '.crate'.
(rename-file file
(string-append (string-drop-right
(string-drop file 35)
(string-drop file 40)
(string-length ".tar.gz"))
".crate")))
(find-files "." "\\.tar\\.gz$"))))