mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-24 05:18:07 -05:00
gnu: rust: Delete install logs and manifests.
* gnu/packages/rust.scm (rust-1.20)[arguments]<#:phases>[delete-install-logs]: New phase. Signed-off-by: Danny Milosavljevic <dannym@scratchpost.org>
This commit is contained in:
parent
e88735b45f
commit
bea01c0d2b
1 changed files with 18 additions and 0 deletions
|
@ -597,6 +597,24 @@ (define-public rust-1.20
|
|||
(("prefix = \"[^\"]*\"")
|
||||
(string-append "prefix = \"" (assoc-ref outputs "cargo") "\"")))
|
||||
(invoke "./x.py" "install" "cargo")))
|
||||
(add-after 'install 'delete-install-logs
|
||||
(lambda* (#:key outputs #:allow-other-keys)
|
||||
(define (delete-manifest-file out-path file)
|
||||
(delete-file (string-append out-path "/lib/rustlib/" file)))
|
||||
|
||||
(let ((out (assoc-ref outputs "out"))
|
||||
(cargo-out (assoc-ref outputs "cargo")))
|
||||
(for-each
|
||||
(lambda (file) (delete-manifest-file out file))
|
||||
'("install.log"
|
||||
"manifest-rust-docs"
|
||||
"manifest-rust-std-x86_64-unknown-linux-gnu"
|
||||
"manifest-rustc"))
|
||||
(for-each
|
||||
(lambda (file) (delete-manifest-file cargo-out file))
|
||||
'("install.log"
|
||||
"manifest-cargo"))
|
||||
#t)))
|
||||
(add-after 'install 'wrap-rustc
|
||||
(lambda* (#:key inputs outputs #:allow-other-keys)
|
||||
(let ((out (assoc-ref outputs "out"))
|
||||
|
|
Loading…
Reference in a new issue