all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: David Craven <david@craven.ch>
To: guix-devel@gnu.org
Subject: [PATCH 2/5] gnu: linux-libre: Use modify-phases.
Date: Fri,  2 Sep 2016 18:09:25 +0200	[thread overview]
Message-ID: <20160902160928.9458-3-david@craven.ch> (raw)
In-Reply-To: <20160902160928.9458-1-david@craven.ch>

* gnu/packages/linux.scm (linux-libre): Use modify-phases.
---
 gnu/packages/linux.scm | 79 ++++++++++++++++++++++++--------------------------
 1 file changed, 38 insertions(+), 41 deletions(-)

diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index be28a1b..dc7ea78 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -253,9 +253,40 @@ for SYSTEM and optionally VARIANT, or #f if there is no such configuration."
     (search-path %load-path file)))
 
 (define-public linux-libre
-  (let* ((version "4.7.2")
-         (build-phase
-          '(lambda* (#:key system inputs #:allow-other-keys #:rest args)
+  (package
+    (name "linux-libre")
+    (version "4.7.2")
+    (source (origin
+              (method url-fetch)
+              (uri (linux-libre-urls version))
+              (sha256
+               (base32
+                "1rp09y2hv0hvdybm2n2im9717kzxmklpgzs8k1bmdfzqxyg8cb85"))))
+    (build-system gnu-build-system)
+    (supported-systems '("x86_64-linux" "i686-linux"))
+    (native-inputs `(("perl" ,perl)
+                     ("bc" ,bc)
+                     ("openssl" ,openssl)
+                     ("module-init-tools" ,module-init-tools)
+                     ("patch/freedo+gnu" ,%boot-logo-patch)
+
+                     ,@(let ((conf (kernel-config
+                                    (or (%current-target-system)
+                                        (%current-system))
+                                    #:variant (version-major+minor version))))
+                         (if conf
+                             `(("kconfig" ,conf))
+                             '()))))
+    (arguments
+     `(#:modules ((guix build gnu-build-system)
+                  (guix build utils)
+                  (srfi srfi-1)
+                  (ice-9 match))
+       #:phases
+       (modify-phases %standard-phases
+         (delete 'configure)
+         (replace 'build
+           (lambda* (#:key system inputs #:allow-other-keys #:rest args)
              ;; Avoid introducing timestamps
              (setenv "KCONFIG_NOTIMESTAMP" "1")
              (setenv "KBUILD_BUILD_TIMESTAMP" (getenv "SOURCE_DATE_EPOCH"))
@@ -305,8 +336,8 @@ for SYSTEM and optionally VARIANT, or #f if there is no such configuration."
                ;; Call the default `build' phase so `-j' is correctly
                ;; passed.
                (apply build #:make-flags "all" args))))
-         (install-phase
-          `(lambda* (#:key inputs outputs #:allow-other-keys)
+         (replace 'install
+           (lambda* (#:key inputs outputs #:allow-other-keys)
              (let* ((out    (assoc-ref outputs "out"))
                     (moddir (string-append out "/lib/modules"))
                     (mit    (assoc-ref inputs "module-init-tools")))
@@ -323,47 +354,13 @@ for SYSTEM and optionally VARIANT, or #f if there is no such configuration."
                                (string-append "INSTALL_MOD_PATH=" out)
                                "INSTALL_MOD_STRIP=1"
                                "modules_install"))))))
-   (package
-    (name "linux-libre")
-    (version version)
-    (source (origin
-             (method url-fetch)
-             (uri (linux-libre-urls version))
-             (sha256
-              (base32
-               "1rp09y2hv0hvdybm2n2im9717kzxmklpgzs8k1bmdfzqxyg8cb85"))))
-    (build-system gnu-build-system)
-    (supported-systems '("x86_64-linux" "i686-linux"))
-    (native-inputs `(("perl" ,perl)
-                     ("bc" ,bc)
-                     ("openssl" ,openssl)
-                     ("module-init-tools" ,module-init-tools)
-                     ("patch/freedo+gnu" ,%boot-logo-patch)
-
-                     ,@(let ((conf (kernel-config
-                                    (or (%current-target-system)
-                                        (%current-system))
-                                    #:variant (version-major+minor version))))
-                         (if conf
-                             `(("kconfig" ,conf))
-                             '()))))
-    (arguments
-     `(#:modules ((guix build gnu-build-system)
-                  (guix build utils)
-                  (srfi srfi-1)
-                  (ice-9 match))
-       #:phases (alist-replace
-                 'build ,build-phase
-                 (alist-replace
-                  'install ,install-phase
-                  (alist-delete 'configure %standard-phases)))
        #:tests? #f))
+    (home-page "http://www.gnu.org/software/linux-libre/")
     (synopsis "100% free redistribution of a cleaned Linux kernel")
     (description
      "GNU Linux-Libre is a free (as in freedom) variant of the Linux kernel.
 It has been modified to remove all non-free binary blobs.")
-    (license license:gpl2)
-    (home-page "http://www.gnu.org/software/linux-libre/"))))
+    (license license:gpl2)))
 
 (define-public linux-libre-4.4
   (package
-- 
2.9.0

  parent reply	other threads:[~2016-09-02 16:10 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 ` David Craven [this message]
2016-09-05  8:23   ` [PATCH 2/5] gnu: linux-libre: Use modify-phases 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160902160928.9458-3-david@craven.ch \
    --to=david@craven.ch \
    --cc=guix-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.