From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Craven Subject: [PATCH] gnu: linux-libre-headers: Use modify-phases. Date: Fri, 2 Sep 2016 18:09:23 +0200 Message-ID: <20160902160928.9458-1-david@craven.ch> Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:52361) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bfr2S-00065Z-GE for guix-devel@gnu.org; Fri, 02 Sep 2016 12:10:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bfr2K-0005ZE-SV for guix-devel@gnu.org; Fri, 02 Sep 2016 12:09:54 -0400 Received: from so254-10.mailgun.net ([198.61.254.10]:50340) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bfr2J-0005Xt-G4 for guix-devel@gnu.org; Fri, 02 Sep 2016 12:09:48 -0400 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-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