gnu: linux-libre-headers: Set 'ARCH' to 'mips'.
* gnu/packages/linux.scm (system->linux-architecture): New procedure. (linux-libre-headers): Adjust accordingly.
This commit is contained in:
parent
6ec8f7778f
commit
618cea694d
|
@ -31,18 +31,22 @@
|
||||||
#:use-module (guix download)
|
#:use-module (guix download)
|
||||||
#:use-module (guix build-system gnu))
|
#: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
|
(define-public linux-libre-headers
|
||||||
(let* ((version* "3.3.8")
|
(let* ((version* "3.3.8")
|
||||||
(build-phase
|
(build-phase
|
||||||
'(lambda* (#:key system #:allow-other-keys)
|
(lambda (arch)
|
||||||
(let ((arch (car (string-split system #\-))))
|
`(lambda _
|
||||||
(setenv "ARCH"
|
(setenv "ARCH" ,(system->linux-architecture arch))
|
||||||
(cond ((string=? arch "i686") "i386")
|
(format #t "`ARCH' set to `~a'~%" (getenv "ARCH"))
|
||||||
(else arch)))
|
|
||||||
(format #t "`ARCH' set to `~a'~%" (getenv "ARCH")))
|
|
||||||
|
|
||||||
(and (zero? (system* "make" "defconfig"))
|
(and (zero? (system* "make" "defconfig"))
|
||||||
(zero? (system* "make" "mrproper" "headers_check")))))
|
(zero? (system* "make" "mrproper" "headers_check"))))))
|
||||||
(install-phase
|
(install-phase
|
||||||
`(lambda* (#:key outputs #:allow-other-keys)
|
`(lambda* (#:key outputs #:allow-other-keys)
|
||||||
(let ((out (assoc-ref outputs "out")))
|
(let ((out (assoc-ref outputs "out")))
|
||||||
|
@ -73,7 +77,7 @@
|
||||||
(guix build utils)
|
(guix build utils)
|
||||||
(srfi srfi-1))
|
(srfi srfi-1))
|
||||||
#:phases (alist-replace
|
#:phases (alist-replace
|
||||||
'build ,build-phase
|
'build ,(build-phase (%current-system))
|
||||||
(alist-replace
|
(alist-replace
|
||||||
'install ,install-phase
|
'install ,install-phase
|
||||||
(alist-delete 'configure %standard-phases)))
|
(alist-delete 'configure %standard-phases)))
|
||||||
|
|
Loading…
Reference in New Issue