Hi,
Nikita Karetnikov <[email protected]> skribis:
> starting phase `build'
> `ARCH' set to `mips64el'
> Makefile:484:
> /tmp/nix-build-xww122kbc08qcyaika8pf03x273rvph7-linux-libre-headers-3.3.8.drv-0/linux-3.3.8/arch/mips64el/Makefile:
> No such file or directory
This is because Linux calls this “mips”, not “mips64el”.
The attached patch should solve it, while avoiding a rebuild on other
architectures:
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index de6d53a..aad345a 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? arch "mips")
+ "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)))
Can you confirm?
Thanks,
Ludo’.