unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH] gnu: linux-libre-headers: Use modify-phases.
@ 2016-09-02 16:09 David Craven
  2016-09-02 16:09 ` [PATCH 1/5] gnu: module-init-tools: Prevent line wrapping David Craven
                   ` (5 more replies)
  0 siblings, 6 replies; 16+ messages in thread
From: David Craven @ 2016-09-02 16:09 UTC (permalink / raw)
  To: guix-devel

* gnu/packages/linux.scm (linux-libre-headers): Use modify phases.
---
 gnu/packages/linux.scm | 58 ++++++++++++++++++++++++--------------------------
 1 file changed, 28 insertions(+), 30 deletions(-)

diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index aac2cd1..adfa027 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -109,17 +109,36 @@
          version "-gnu.tar.xz")))
 
 (define-public linux-libre-headers
-  (let* ((version "4.1.18")
-         (build-phase
-          (lambda (arch)
-            `(lambda _
-               (setenv "ARCH" ,(system->linux-architecture arch))
+  (package
+    (name "linux-libre-headers")
+    (version "4.1.18")
+    (source (origin
+             (method url-fetch)
+             (uri (linux-libre-urls version))
+             (sha256
+              (base32
+               "1bddh2rg645lavhjkk9z75vflba5y0g73z2fjwgbfrj5jb44x9i7"))))
+    (build-system gnu-build-system)
+    (native-inputs `(("perl" ,perl)))
+    (arguments
+     `(#:modules ((guix build gnu-build-system)
+                  (guix build utils)
+                  (srfi srfi-1))
+       #:phases
+       (modify-phases %standard-phases
+         (delete 'configure)
+         (replace 'build
+           (lambda _
+             (let ((arch ,(system->linux-architecture
+                          (or (%current-target-system)
+                              (%current-system)))))
+               (setenv "ARCH" arch)
                (format #t "`ARCH' set to `~a'~%" (getenv "ARCH"))
 
                (and (zero? (system* "make" "defconfig"))
                     (zero? (system* "make" "mrproper" "headers_check"))))))
-         (install-phase
-          `(lambda* (#:key outputs #:allow-other-keys)
+         (replace 'install
+           (lambda* (#:key outputs #:allow-other-keys)
              (let ((out (assoc-ref outputs "out")))
                (and (zero? (system* "make"
                                     (string-append "INSTALL_HDR_PATH=" out)
@@ -139,33 +158,12 @@
                       (for-each delete-file (find-files out "\\.install"))
 
                       #t))))))
-   (package
-    (name "linux-libre-headers")
-    (version version)
-    (source (origin
-             (method url-fetch)
-             (uri (linux-libre-urls version))
-             (sha256
-              (base32
-               "1bddh2rg645lavhjkk9z75vflba5y0g73z2fjwgbfrj5jb44x9i7"))))
-    (build-system gnu-build-system)
-    (native-inputs `(("perl" ,perl)))
-    (arguments
-     `(#:modules ((guix build gnu-build-system)
-                  (guix build utils)
-                  (srfi srfi-1))
-       #:phases (alist-replace
-                 'build ,(build-phase (or (%current-target-system)
-                                          (%current-system)))
-                 (alist-replace
-                  'install ,install-phase
-                  (alist-delete 'configure %standard-phases)))
        #:allowed-references ()
        #:tests? #f))
+    (home-page "http://www.gnu.org/software/linux-libre")
     (synopsis "GNU Linux-Libre kernel headers")
     (description "Headers of the Linux-Libre kernel.")
-    (license license:gpl2)
-    (home-page "http://www.gnu.org/software/linux-libre/"))))
+    (license license:gpl2)))
 
 (define-public module-init-tools
   (package
-- 
2.9.0

^ permalink raw reply related	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2016-09-05 20:45 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-02 16:09 [PATCH] gnu: linux-libre-headers: Use modify-phases David Craven
2016-09-02 16:09 ` [PATCH 1/5] gnu: module-init-tools: Prevent line wrapping David Craven
2016-09-05  8:22   ` Ludovic Courtès
2016-09-02 16:09 ` [PATCH 2/5] gnu: linux-libre: Use modify-phases David Craven
2016-09-05  8:23   ` Ludovic Courtès
2016-09-02 16:09 ` [PATCH 3/5] gnu: linux-libre: Use system->architecture David Craven
2016-09-05  8:27   ` Ludovic Courtès
2016-09-02 16:09 ` [PATCH 4/5] gnu: kernel-config: Add armhf kernel config David Craven
2016-09-05  8:29   ` Ludovic Courtès
2016-09-05 14:25     ` Danny Milosavljevic
2016-09-05 14:29       ` David Craven
2016-09-05 20:44         ` Leo Famulari
2016-09-02 16:09 ` [PATCH 5/5] gnu: linux-libre: Add support for cross-compilation David Craven
2016-09-02 16:24   ` David Craven
2016-09-05  8:33   ` Ludovic Courtès
2016-09-05  8:23 ` [PATCH] gnu: linux-libre-headers: Use modify-phases Ludovic Courtès

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).