guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

02/04: gnu: rust: Delete install logs and manifests.


From: guix-commits
Subject: 02/04: gnu: rust: Delete install logs and manifests.
Date: Thu, 9 May 2019 20:16:38 -0400 (EDT)

dannym pushed a commit to branch master
in repository guix.

commit bea01c0d2ba4d4198423a014ae0322e0817a803a
Author: Ivan Petkov <address@hidden>
Date:   Thu May 2 03:38:13 2019 -0700

    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 <address@hidden>
---
 gnu/packages/rust.scm | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/gnu/packages/rust.scm b/gnu/packages/rust.scm
index 27388d3..becb804 100644
--- a/gnu/packages/rust.scm
+++ b/gnu/packages/rust.scm
@@ -597,6 +597,24 @@ jemalloc = \"" jemalloc "/lib/libjemalloc_pic.a" "\"
                    (("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"))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]