aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikita Karetnikov <nikita@karetnikov.org>2013-02-19 11:17:08 +0000
committerLudovic Courtès <ludo@gnu.org>2013-02-27 20:55:42 +0100
commit618cea694d92dd73482b2a08675c9dec84d512ac (patch)
tree652354cee07b2324fefebce2baf310585f2ec347
parent6ec8f7778f3f44f842782ecf164885ef6dbb1e4f (diff)
downloadpatches-618cea694d92dd73482b2a08675c9dec84d512ac.tar
patches-618cea694d92dd73482b2a08675c9dec84d512ac.tar.gz
gnu: linux-libre-headers: Set 'ARCH' to 'mips'.
* gnu/packages/linux.scm (system->linux-architecture): New procedure. (linux-libre-headers): Adjust accordingly.
-rw-r--r--gnu/packages/linux.scm22
1 files changed, 13 insertions, 9 deletions
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index b97315580b..31e6c9bf73 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -31,18 +31,22 @@
#:use-module (guix download)
#:use-module (guix build-system gnu))
+(define (system->linux-architecture arch)
+ (let ((arch (car (string-split arch #\-))))
+ (cond ((string=? arch "i686") "i386")
+ ((string-prefix? "mips" arch) "mips")
+ (else arch))))
+
(define-public linux-libre-headers
(let* ((version* "3.3.8")
(build-phase
- '(lambda* (#:key system #:allow-other-keys)
- (let ((arch (car (string-split system #\-))))
- (setenv "ARCH"
- (cond ((string=? arch "i686") "i386")
- (else arch)))
- (format #t "`ARCH' set to `~a'~%" (getenv "ARCH")))
+ (lambda (arch)
+ `(lambda _
+ (setenv "ARCH" ,(system->linux-architecture arch))
+ (format #t "`ARCH' set to `~a'~%" (getenv "ARCH"))
- (and (zero? (system* "make" "defconfig"))
- (zero? (system* "make" "mrproper" "headers_check")))))
+ (and (zero? (system* "make" "defconfig"))
+ (zero? (system* "make" "mrproper" "headers_check"))))))
(install-phase
`(lambda* (#:key outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out")))
@@ -73,7 +77,7 @@
(guix build utils)
(srfi srfi-1))
#:phases (alist-replace
- 'build ,build-phase
+ 'build ,(build-phase (%current-system))
(alist-replace
'install ,install-phase
(alist-delete 'configure %standard-phases)))