Subject: bug#35963: closed (Re: [bug#35963] [PATCH] gnu: cross-base: Allow non-default linux-headers.)

From: [email-masked] (GNU bug Tracking System)
Date: Wed, 29 May 2019 13:47:02 +0000

Your bug report

#35963: [PATCH] gnu: cross-base: Allow non-default linux-headers.

which was filed against the guix-patches package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
35963: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=35963
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: [bug#35963] [PATCH] gnu: cross-base: Allow non-default linux-headers.
From: Danny Milosavljevic <[email-masked]>
To: Carl Dong <[email-masked]>
Cc: [email-masked]
Date: Wed, 29 May 2019 15:45:57 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

Thanks!

Pushed to guix master as commit 2ea77d48a739eb289f2472d2c30c37a30bbcb571.

Subject: [PATCH] gnu: cross-base: Allow non-default linux-headers.
From: Carl Dong <[email-masked]>
To: [email-masked]
Cc: Carl Dong <[email-masked]>
Date: Tue, 28 May 2019 15:57:41 +0000
List-Id: <debbugs-submit.debbugs.gnu.org>

* gnu/packages/cross-base.scm (cross-kernel-headers): Add
  'linux-headers' optional argument to specify using a non-default
  linux-kernel package.
---
 gnu/packages/cross-base.scm | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/gnu/packages/cross-base.scm b/gnu/packages/cross-base.scm
index b3b90a6490..a0341ebc5d 100644
--- a/gnu/packages/cross-base.scm
+++ b/gnu/packages/cross-base.scm
@@ -39,7 +39,8 @@
   #:export (cross-binutils
             cross-libc
             cross-gcc
-            cross-newlib?))
+            cross-newlib?
+            cross-kernel-headers))
 
 (define-syntax %xgcc
   ;; GCC package used as the basis for cross-compilation.  It doesn't have to
@@ -276,18 +277,19 @@ target that libc."
 
 (define* (cross-kernel-headers target
                                #:optional
+                               (linux-headers linux-libre-headers)
                                (xgcc (cross-gcc target))
                                (xbinutils (cross-binutils target)))
   "Return headers depending on TARGET."
 
   (define xlinux-headers
-    (package (inherit linux-libre-headers)
-      (name (string-append (package-name linux-libre-headers)
+    (package (inherit linux-headers)
+      (name (string-append (package-name linux-headers)
                            "-cross-" target))
       (arguments
        (substitute-keyword-arguments
            `(#:implicit-cross-inputs? #f
-             ,@(package-arguments linux-libre-headers))
+             ,@(package-arguments linux-headers))
          ((#:phases phases)
           `(alist-replace
             'build
@@ -300,7 +302,7 @@ target that libc."
             ,phases))))
       (native-inputs `(("cross-gcc" ,xgcc)
                        ("cross-binutils" ,xbinutils)
-                       ,@(package-native-inputs linux-libre-headers)))))
+                       ,@(package-native-inputs linux-headers)))))
 
   (define xgnumach-headers
     (package (inherit gnumach-headers)
-- 
2.21.0