guix-commits
[Top][All Lists]
Advanced

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

01/03: gnu: cross-base: Remove unneeded 'let'.


From: guix-commits
Subject: 01/03: gnu: cross-base: Remove unneeded 'let'.
Date: Wed, 8 Apr 2020 07:14:17 -0400 (EDT)

mbakke pushed a commit to branch core-updates
in repository guix.

commit be1e842ad78ac6c52fc7790f4a3ffd716673c111
Author: Ludovic Courtès <address@hidden>
AuthorDate: Sat Apr 4 22:50:55 2020 +0200

    gnu: cross-base: Remove unneeded 'let'.
    
    This is a followup to 102d307520dee27a40feb1ca5a699763a2f3aefe.
    
    * gnu/packages/cross-base.scm (cross-libc): Remove (let ((libc libc)) …).
    
    (cherry picked from commit 524a4e357cd71566841aaf405e8548fa3600b11b)
---
 gnu/packages/cross-base.scm | 126 ++++++++++++++++++++++----------------------
 1 file changed, 63 insertions(+), 63 deletions(-)

diff --git a/gnu/packages/cross-base.scm b/gnu/packages/cross-base.scm
index 538f406..6c971d0 100644
--- a/gnu/packages/cross-base.scm
+++ b/gnu/packages/cross-base.scm
@@ -479,69 +479,69 @@ and the cross tool chain."
       (native-libc target libc
                    #:xgcc xgcc
                    #:xbinutils xbinutils)
-      (let ((libc libc))
-        (package (inherit libc)
-          (name (string-append "glibc-cross-" target))
-          (arguments
-           (substitute-keyword-arguments
-               `(;; Disable stripping (see above.)
-                 #:strip-binaries? #f
-
-                 ;; This package is used as a target input, but it should not 
have
-                 ;; the usual cross-compilation inputs since that would include
-                 ;; itself.
-                 #:implicit-cross-inputs? #f
-
-                 ;; We need SRFI 26.
-                 #:modules ((guix build gnu-build-system)
-                            (guix build utils)
-                            (srfi srfi-26))
-
-                 ,@(package-arguments libc))
-             ((#:configure-flags flags)
-              `(cons ,(string-append "--host=" target)
-                     ,(if (hurd-triplet? target)
-                          `(cons "--disable-werror" ,flags)
-                          flags)))
-             ((#:phases phases)
-              `(modify-phases ,phases
-                 (add-before 'configure 'set-cross-kernel-headers-path
-                   (lambda* (#:key inputs #:allow-other-keys)
-                     (let* ((kernel (assoc-ref inputs "kernel-headers"))
-                            (cpath (string-append kernel "/include")))
-                       (for-each (cut setenv <> cpath)
-                                 ',%gcc-cross-include-paths)
-                       (setenv "CROSS_LIBRARY_PATH"
-                               (string-append kernel "/lib")) ; for Hurd's 
libihash
-                       #t)))
-                 ,@(if (hurd-triplet? target)
-                       '((add-after 'install 'augment-libc.so
-                           (lambda* (#:key outputs #:allow-other-keys)
-                             (let* ((out (assoc-ref outputs "out")))
-                               (substitute* (string-append out "/lib/libc.so")
-                                 (("/[^ ]+/lib/libc.so.0.3")
-                                  (string-append out "/lib/libc.so.0.3"
-                                                 " libmachuser.so 
libhurduser.so"))))
-                             #t)))
-                       '())))))
-
-          ;; Shadow the native "kernel-headers" because glibc's recipe expects 
the
-          ;; "kernel-headers" input to point to the right thing.
-          (propagated-inputs `(("kernel-headers" ,xheaders)))
-
-          ;; FIXME: 'static-bash' should really be an input, not a native 
input, but
-          ;; to do that will require building an intermediate cross libc.
-          (inputs '())
-
-          (native-inputs `(("cross-gcc" ,xgcc)
-                           ("cross-binutils" ,xbinutils)
-                           ,@(if (hurd-triplet? target)
-                                 `(("cross-mig"
-                                    ,@(assoc-ref (package-native-inputs 
xheaders)
-                                                 "cross-mig")))
-                                 '())
-                           ,@(package-inputs libc)     ;FIXME: static-bash
-                           ,@(package-native-inputs libc)))))))
+      (package
+        (inherit libc)
+        (name (string-append "glibc-cross-" target))
+        (arguments
+         (substitute-keyword-arguments
+             `( ;; Disable stripping (see above.)
+               #:strip-binaries? #f
+
+               ;; This package is used as a target input, but it should not 
have
+               ;; the usual cross-compilation inputs since that would include
+               ;; itself.
+               #:implicit-cross-inputs? #f
+
+               ;; We need SRFI 26.
+               #:modules ((guix build gnu-build-system)
+                          (guix build utils)
+                          (srfi srfi-26))
+
+               ,@(package-arguments libc))
+           ((#:configure-flags flags)
+            `(cons ,(string-append "--host=" target)
+                   ,(if (hurd-triplet? target)
+                        `(cons "--disable-werror" ,flags)
+                        flags)))
+           ((#:phases phases)
+            `(modify-phases ,phases
+               (add-before 'configure 'set-cross-kernel-headers-path
+                 (lambda* (#:key inputs #:allow-other-keys)
+                   (let* ((kernel (assoc-ref inputs "kernel-headers"))
+                          (cpath (string-append kernel "/include")))
+                     (for-each (cut setenv <> cpath)
+                               ',%gcc-cross-include-paths)
+                     (setenv "CROSS_LIBRARY_PATH"
+                             (string-append kernel "/lib")) ; for Hurd's 
libihash
+                     #t)))
+               ,@(if (hurd-triplet? target)
+                     '((add-after 'install 'augment-libc.so
+                         (lambda* (#:key outputs #:allow-other-keys)
+                           (let* ((out (assoc-ref outputs "out")))
+                             (substitute* (string-append out "/lib/libc.so")
+                               (("/[^ ]+/lib/libc.so.0.3")
+                                (string-append out "/lib/libc.so.0.3"
+                                               " libmachuser.so 
libhurduser.so"))))
+                           #t)))
+                     '())))))
+
+        ;; Shadow the native "kernel-headers" because glibc's recipe expects 
the
+        ;; "kernel-headers" input to point to the right thing.
+        (propagated-inputs `(("kernel-headers" ,xheaders)))
+
+        ;; FIXME: 'static-bash' should really be an input, not a native input, 
but
+        ;; to do that will require building an intermediate cross libc.
+        (inputs '())
+
+        (native-inputs `(("cross-gcc" ,xgcc)
+                         ("cross-binutils" ,xbinutils)
+                         ,@(if (hurd-triplet? target)
+                               `(("cross-mig"
+                                  ,@(assoc-ref (package-native-inputs xheaders)
+                                               "cross-mig")))
+                               '())
+                         ,@(package-inputs libc)  ;FIXME: static-bash
+                         ,@(package-native-inputs libc))))))
 
 (define* (native-libc target
                      #:optional



reply via email to

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