gnu: gcc-toolchain: Remove "glibc:debug" and "glibc:static" from "out".
authorLudovic Courtès <ludo@gnu.org>
Mon, 29 Jun 2020 21:12:13 +0000 (23:12 +0200)
committerLudovic Courtès <ludo@gnu.org>
Mon, 29 Jun 2020 22:18:28 +0000 (00:18 +0200)
With this change, the closure of "gcc-toolchain:out" goes from 1 GiB to
393 MiB, which was the intention.

* gnu/packages/commencement.scm (make-gcc-toolchain): Filter out
"libc-debug" and "libc-static" from OUT.

gnu/packages/commencement.scm

index 59ef5d0..ef250e0 100644 (file)
@@ -3828,14 +3828,17 @@ COREUTILS-FINAL vs. COREUTILS, etc."
        '(#:modules ((guix build union))
          #:builder (begin
                      (use-modules (ice-9 match)
+                                  (srfi srfi-1)
                                   (srfi srfi-26)
                                   (guix build union))
 
                      (let ((out (assoc-ref %outputs "out")))
-
-                       (match %build-inputs
-                         (((names . directories) ...)
-                          (union-build out directories)))
+                       (union-build out
+                                    (filter-map (match-lambda
+                                                  (("libc-debug" . _) #f)
+                                                  (("libc-static" . _) #f)
+                                                  ((_ . directory) directory))
+                                                %build-inputs))
 
                        (union-build (assoc-ref %outputs "debug")
                                     (list (assoc-ref %build-inputs