guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

branch master updated: gnu: ccl: Prevent creating invalid derivation on


From: guix-commits
Subject: branch master updated: gnu: ccl: Prevent creating invalid derivation on unsupported platforms.
Date: Sun, 31 May 2020 09:00:14 -0400

This is an automated email from the git hooks/post-receive script.

mbakke pushed a commit to branch master
in repository guix.

The following commit(s) were added to refs/heads/master by this push:
     new bf6438f  gnu: ccl: Prevent creating invalid derivation on unsupported 
platforms.
bf6438f is described below

commit bf6438f46583003cfd851c9f8ff4104aa3107c4d
Author: Marius Bakke <marius@gnu.org>
AuthorDate: Sun May 31 14:56:57 2020 +0200

    gnu: ccl: Prevent creating invalid derivation on unsupported platforms.
    
    * gnu/packages/lisp.scm (ccl)[inputs]: For the "ccl-bootstrap" input, use 
the
    x86 origin as the fallback entry.
    [arguments]: Add (ice-9 match) in #:modules.  Rewrite phases to use the 
scoped
    SYSTEM variable instead of splicing in a match on %CURRENT-SYSTEM.
---
 gnu/packages/lisp.scm | 50 ++++++++++++++++++++++----------------------------
 1 file changed, 22 insertions(+), 28 deletions(-)

diff --git a/gnu/packages/lisp.scm b/gnu/packages/lisp.scm
index 21e1a04..97b8f0d 100644
--- a/gnu/packages/lisp.scm
+++ b/gnu/packages/lisp.scm
@@ -592,25 +592,24 @@ statistical profiler, a code coverage tool, and many 
other extensions.")
            (uri (string-append
                  "https://github.com/Clozure/ccl/releases/download/v"; version 
"/"
                  (match (%current-system)
-                   ((or "i686-linux" "x86_64-linux") "linuxx86")
                    ("armhf-linux" "linuxarm")
-                   ;; Prevent errors when querying this package on unsupported
-                   ;; platforms, e.g. when running "guix package --search="
-                   (_ "UNSUPPORTED"))
+                   ;; XXX: This source only works on x86, but provide it as a
+                   ;; catch-all to prevent errors when querying this package
+                   ;; on unsupported platforms.
+                   (_ "linuxx86"))
                  ".tar.gz"))
            (sha256
             (base32
              (match (%current-system)
-               ((or "i686-linux" "x86_64-linux")
-                "15l7cfa4a7jkfwdzsfm4q3n22jnb57imxahpql3h77xin57v1gbz")
                ("armhf-linux"
                 "0x4bjx6cxsjvxyagijhlvmc7jkyxifdvz5q5zvz37028va65243c")
-               (_ ""))))))))
+               (_ 
"15l7cfa4a7jkfwdzsfm4q3n22jnb57imxahpql3h77xin57v1gbz"))))))))
     (native-inputs
      `(("m4" ,m4)))
     (arguments
      `(#:tests? #f                      ;no 'check' target
-       #:modules ((srfi srfi-26)
+       #:modules ((ice-9 match)
+                  (srfi srfi-26)
                   (guix build utils)
                   (guix build gnu-build-system))
        #:phases
@@ -622,19 +621,16 @@ statistical profiler, a code coverage tool, and many 
other extensions.")
          (add-before 'build 'pre-build
            ;; Enter the source directory for the current platform's lisp
            ;; kernel, and run 'make clean' to remove the precompiled one.
-           (lambda _
+           (lambda* (#:key system #:allow-other-keys)
              (substitute* "lisp-kernel/m4macros.m4"
                (("/bin/pwd") (which "pwd")))
              (chdir (string-append
                      "lisp-kernel/"
-                     ,(match (or (%current-target-system) (%current-system))
-                        ("i686-linux" "linuxx8632")
-                        ("x86_64-linux" "linuxx8664")
-                        ("armhf-linux" "linuxarm")
-                        ;; Prevent errors when querying this package
-                        ;; on unsupported platforms, e.g. when running
-                        ;; "guix package --search="
-                        (_ "UNSUPPORTED"))))
+                     (match system
+                       ("i686-linux" "linuxx8632")
+                       ("x86_64-linux" "linuxx8664")
+                       ("armhf-linux" "linuxarm")
+                       (_ (string-append "unknown system: " system)))))
              (substitute* '("Makefile")
                (("/bin/rm") "rm"))
              (setenv "CC" "gcc")
@@ -642,7 +638,7 @@ statistical profiler, a code coverage tool, and many other 
extensions.")
          ;; XXX Do we need to recompile the heap image as well for Guix?
          ;; For now just use the one we already got in the tarball.
          (replace 'install
-           (lambda* (#:key outputs inputs #:allow-other-keys)
+           (lambda* (#:key outputs inputs system #:allow-other-keys)
              ;; The lisp kernel built by running 'make' in lisp-kernel/$system
              ;; is put back into the original directory, so go back.  The heap
              ;; image is there as well.
@@ -653,20 +649,18 @@ statistical profiler, a code coverage tool, and many 
other extensions.")
                     (wrapper (string-append bindir "ccl"))
                     (bash (assoc-ref inputs "bash"))
                     (kernel
-                     ,(match (or (%current-target-system) (%current-system))
-                        ("i686-linux" "lx86cl")
-                        ("x86_64-linux" "lx86cl64")
-                        ("armhf-linux" "armcl")
-                        ;; Prevent errors when querying this package
-                        ;; on unsupported platforms, e.g. when running
-                        ;; "guix package --search="
-                        (_ "UNSUPPORTED")))
+                     (match system
+                       ("i686-linux" "lx86cl")
+                       ("x86_64-linux" "lx86cl64")
+                       ("armhf-linux" "armcl")
+                       ;; Unlikely to work, but try it anyway...
+                       (_ system)))
                     (heap (string-append kernel ".image")))
                (install-file kernel libdir)
                (install-file heap libdir)
 
-               (let ((dirs '("lib" "library" "examples" "tools" "objc-bridge"
-                             ,@(match (%current-system)
+               (let ((dirs `("lib" "library" "examples" "tools" "objc-bridge"
+                             ,@(match system
                                  ("x86_64-linux"
                                   '("x86-headers64"))
                                  ("i686-linux"



reply via email to

[Prev in Thread] Current Thread [Next in Thread]