guix-commits
[Top][All Lists]
Advanced

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

09/10: gnu: lean: Use G-expressions.


From: guix-commits
Subject: 09/10: gnu: lean: Use G-expressions.
Date: Mon, 11 Dec 2023 17:50:40 -0500 (EST)

civodul pushed a commit to branch master
in repository guix.

commit f1bcc043a4d471854d6fae7355643c4667929e02
Author: Zhu Zihao <all_but_last@163.com>
AuthorDate: Tue Nov 21 11:54:38 2023 +0800

    gnu: lean: Use G-expressions.
    
    * gnu/packages/lean.scm (lean)[arguments]: Use G-expressions.
    
    Signed-off-by: Ludovic Courtès <ludo@gnu.org>
---
 gnu/packages/lean.scm | 49 ++++++++++++++++++++++++++-----------------------
 1 file changed, 26 insertions(+), 23 deletions(-)

diff --git a/gnu/packages/lean.scm b/gnu/packages/lean.scm
index 12c1849cdb..a8ad085d7e 100644
--- a/gnu/packages/lean.scm
+++ b/gnu/packages/lean.scm
@@ -3,6 +3,7 @@
 ;;; Copyright © 2020 Brett Gilio <brettg@gnu.org>
 ;;; Copyright © 2020 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;; Copyright © 2022 Pradana Aumars <paumars@courrier.dev>
+;;; Copyright © 2023 Zhu Zihao <all_but_last@163.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -25,6 +26,7 @@
   #:use-module (guix build-system cmake)
   #:use-module (guix build-system python)
   #:use-module ((guix licenses) #:prefix license:)
+  #:use-module (guix gexp)
   #:use-module (guix packages)
   #:use-module (guix git-download)
   #:use-module (guix download)
@@ -52,29 +54,30 @@
     (inputs
      (list bash-minimal gmp))
     (arguments
-     `(#:build-type "Release"           ; default upstream build type
-       ;; XXX: Test phases currently fail on 32-bit sytems.
-       ;; Tests for those architectures have been temporarily
-       ;; disabled, pending further investigation.
-       #:tests? ,(and (not (%current-target-system))
-                      (let ((arch (%current-system)))
-                        (not (or (string-prefix? "i686" arch)
-                                 (string-prefix? "armhf" arch)))))
-       #:phases
-       (modify-phases %standard-phases
-         (add-after 'patch-source-shebangs 'patch-tests-shebangs
-           (lambda _
-             (let ((sh (which "sh"))
-                   (bash (which "bash")))
-               (substitute* (find-files "tests/lean" "\\.sh$")
-                 (("#![[:blank:]]?/bin/sh")
-                  (string-append "#!" sh))
-                 (("#![[:blank:]]?/bin/bash")
-                  (string-append "#!" bash))
-                 (("#![[:blank:]]?usr/bin/env bash")
-                  (string-append "#!" bash))))))
-         (add-before 'configure 'chdir-to-src
-           (lambda _ (chdir "src"))))))
+     (list
+      #:build-type "Release"            ; default upstream build type
+      ;; XXX: Test phases currently fail on 32-bit sytems.
+      ;; Tests for those architectures have been temporarily
+      ;; disabled, pending further investigation.
+      #:tests? (and (not (%current-target-system))
+                    (let ((arch (%current-system)))
+                      (not (or (string-prefix? "i686" arch)
+                               (string-prefix? "armhf" arch)))))
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'patch-source-shebangs 'patch-tests-shebangs
+            (lambda _
+              (let ((sh (which "sh"))
+                    (bash (which "bash")))
+                (substitute* (find-files "tests/lean" "\\.sh$")
+                  (("#![[:blank:]]?/bin/sh")
+                   (string-append "#!" sh))
+                  (("#![[:blank:]]?/bin/bash")
+                   (string-append "#!" bash))
+                  (("#![[:blank:]]?usr/bin/env bash")
+                   (string-append "#!" bash))))))
+          (add-before 'configure 'chdir-to-src
+            (lambda _ (chdir "src"))))))
     (synopsis "Theorem prover and programming language")
     (description
      "Lean is a theorem prover and programming language with a small trusted



reply via email to

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