From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Craven Subject: [PATCH 02/17] gnu: linux-libre: Use modify-phases. Date: Fri, 9 Sep 2016 14:34:11 +0200 Message-ID: <20160909123426.18499-2-david@craven.ch> References: <20160909013641.GA9202@jasmine> <20160909123426.18499-1-david@craven.ch> Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:52539) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1biL14-0008UX-4K for guix-devel@gnu.org; Fri, 09 Sep 2016 08:34:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1biL10-0003KA-2F for guix-devel@gnu.org; Fri, 09 Sep 2016 08:34:45 -0400 Received: from so254-10.mailgun.net ([198.61.254.10]:53813) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1biL0y-0003IS-RD for guix-devel@gnu.org; Fri, 09 Sep 2016 08:34:42 -0400 In-Reply-To: <20160909123426.18499-1-david@craven.ch> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: guix-devel@gnu.org * gnu/packages/linux.scm (linux-libre): Use modify-phases. --- gnu/packages/linux.scm | 80 ++++++++++++++++++++++++-------------------------- 1 file changed, 39 insertions(+), 41 deletions(-) diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index 260017b..e19712f 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -258,9 +258,41 @@ 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")) @@ -310,8 +342,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"))) @@ -328,47 +360,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