From 31a7f172941c592f04f8f741b89e04a2a6677a76 Mon Sep 17 00:00:00 2001 From: Nikita Karetnikov Date: Thu, 14 Feb 2013 06:14:48 +0000 Subject: [PATCH] gnu: Set 'ARCH' to 'mips'. * gnu/packages/linux.scm (linux-libre-headers): Set 'ARCH' to 'mips'. --- gnu/packages/linux.scm | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index 58cddc0..fe8148c 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -29,20 +29,31 @@ #:use-module (gnu packages pkg-config) #:use-module (guix packages) #:use-module (guix download) - #:use-module (guix build-system gnu)) + #:use-module (guix build-system gnu) + #:use-module ((guix utils) #:select (%current-system))) (define-public linux-libre-headers (let* ((version* "3.3.8") (build-phase - '(lambda* (#:key system #:allow-other-keys) + (lambda () + `(lambda* (#:key system #:allow-other-keys) (let ((arch (car (string-split system #\-)))) (setenv "ARCH" (cond ((string=? arch "i686") "i386") + + ;; FIXME: The unquote below is just to + ;; avoid triggering a rebuild. Remove me + ;; on the next core-updates. + ,@(if (string-prefix? "mips" + (%current-system)) + `(((string-prefix? "mips" arch) + "mips")) + '()) (else arch))) (format #t "`ARCH' set to `~a'~%" (getenv "ARCH"))) (and (zero? (system* "make" "defconfig")) - (zero? (system* "make" "mrproper" "headers_check"))))) + (zero? (system* "make" "mrproper" "headers_check")))))) (install-phase `(lambda* (#:key outputs #:allow-other-keys) (let ((out (assoc-ref outputs "out"))) @@ -73,7 +84,7 @@ (guix build utils) (srfi srfi-1)) #:phases (alist-replace - 'build ,build-phase + 'build ,(build-phase) (alist-replace 'install ,install-phase (alist-delete 'configure %standard-phases))) -- 1.8.0.2