>> What do you mean by "host code"?

> I mean code that runs in your ‘guix-build’ process, as opposed to
> builder code running in the chroot (search the manual for “strata”.)

I've read the manual.  But it's still not clear.

For example: How can I tell which expression is run by a Guile process
launched by the daemon?

Build succeeded; I'm attaching the patch.  (Andreas, could you test it?)
Is it OK to push?

From 92f945333f8fa31c855e75ea59d274d457656cfe Mon Sep 17 00:00:00 2001
From: Nikita Karetnikov <nik...@karetnikov.org>
Date: Tue, 19 Feb 2013 09:37:11 +0000
Subject: [PATCH] gnu: Set 'ARCH' to 'mips'.

* gnu/packages/linux.scm (system->linux-architecture): New procedure.
  (linux-libre-headers): Adjust accordingly.
---
 gnu/packages/linux.scm | 22 +++++++++++++---------
 1 file changed, 13 insertions(+), 9 deletions(-)

diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 58cddc0..e88c6ae 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)))
-- 
1.8.0.2

Attachment: pgpKhbakLr0_A.pgp
Description: PGP signature

Reply via email to