guix-commits
[Top][All Lists]
Advanced

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

05/07: gnu: zig-0.9: Use gexp.


From: guix-commits
Subject: 05/07: gnu: zig-0.9: Use gexp.
Date: Sat, 25 Nov 2023 09:02:41 -0500 (EST)

hako pushed a commit to branch master
in repository guix.

commit 1680e3c77f4cc37b1f2ea378ae10a9353f3c6e92
Author: Hilton Chain <hako@ultrarare.space>
AuthorDate: Mon Oct 23 22:26:45 2023 +0800

    gnu: zig-0.9: Use gexp.
    
    * gnu/packages/zig.scm (zig-0.9)[arguments]: Use gexp.
    
    Change-Id: I38c856320ace6d960ae342f5de164ca6c3f449c0
---
 gnu/packages/zig.scm | 95 ++++++++++++++++++++++++++--------------------------
 1 file changed, 48 insertions(+), 47 deletions(-)

diff --git a/gnu/packages/zig.scm b/gnu/packages/zig.scm
index 882e5426dc..bc3e1c019a 100644
--- a/gnu/packages/zig.scm
+++ b/gnu/packages/zig.scm
@@ -147,52 +147,53 @@ toolchain.  Among other features it provides
     (native-inputs
      (list llvm-13))
     (arguments
-     `(#:configure-flags
-       (list ,@(if (%current-target-system)
-                   (string-append "-DZIG_TARGET_TRIPLE="
-                                  (%current-target-system))
-                   '()))
-       #:out-of-source? #f ; for tests
-       ;; There are too many unclear test failures.
-       #:tests? ,(not (or (target-riscv64?)
-                          (%current-target-system)))
-       #:phases
-       (modify-phases %standard-phases
-         (add-after 'configure 'set-cache-dir
-           (lambda _
-             ;; Set cache dir, otherwise Zig looks for `$HOME/.cache'.
-             (setenv "ZIG_GLOBAL_CACHE_DIR"
-                     (string-append (getcwd) "/zig-cache"))))
-         ,@(if (target-riscv64?)
-             ;; It is unclear why all these tests fail to build.
-             `((add-after 'unpack 'adjust-tests
-                 (lambda _
-                   (substitute* "build.zig"
-                     ((".*addRuntimeSafetyTests.*") "")
-                     ((".*addRunTranslatedCTests.*") ""))
-                   (substitute* "test/standalone.zig"
-                     ;; These tests fail to build on riscv64-linux.
-                     ;; They both contain 'exe.linkSystemLibrary("c");'
-                     ((".*shared_library.*") "")
-                     ((".*mix_o_files.*") "")
-                     ;; ld.lld: error: undefined symbol: __tls_get_addr
-                     ;; Is this symbol x86 only in glibc?
-                     ((".*link_static_lib_as_system_lib.*") "")))))
-             '())
-         (delete 'check)
-         (add-after 'install 'check
-           (lambda* (#:key outputs tests? #:allow-other-keys)
-             (when tests?
-               (invoke (string-append (assoc-ref outputs "out") "/bin/zig")
-                       ;; Testing the standard library takes >7.5GB RAM, and
-                       ;; will fail if it is OOM-killed.  The 'test-toolchain'
-                       ;; target skips standard library and doc tests.
-                       "build" "test-toolchain"
-                       ;; Stage 2 is experimental, not what we run with `zig',
-                       ;; and stage 2 tests require a lot of RAM.
-                       "-Dskip-stage2-tests"
-                       ;; Non-native tests try to link and execute non-native
-                       ;; binaries.
-                       "-Dskip-non-native")))))))))
+     (list
+      #:configure-flags
+      #~(list #$@(if (%current-target-system)
+                     (list (string-append "-DZIG_TARGET_TRIPLE="
+                                          (%current-target-system)))
+                     '()))
+      #:out-of-source? #f         ; for tests
+      ;; There are too many unclear test failures.
+      #:tests? (not (or (target-riscv64?)
+                        (%current-target-system)))
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'configure 'set-cache-dir
+            (lambda _
+              ;; Set cache dir, otherwise Zig looks for `$HOME/.cache'.
+              (setenv "ZIG_GLOBAL_CACHE_DIR"
+                      (string-append (getcwd) "/zig-cache"))))
+          #$@(if (target-riscv64?)
+                 ;; It is unclear why all these tests fail to build.
+                 `((add-after 'unpack 'adjust-tests
+                     (lambda _
+                       (substitute* "build.zig"
+                         ((".*addRuntimeSafetyTests.*") "")
+                         ((".*addRunTranslatedCTests.*") ""))
+                       (substitute* "test/standalone.zig"
+                         ;; These tests fail to build on riscv64-linux.
+                         ;; They both contain 'exe.linkSystemLibrary("c");'
+                         ((".*shared_library.*") "")
+                         ((".*mix_o_files.*") "")
+                         ;; ld.lld: error: undefined symbol: __tls_get_addr
+                         ;; Is this symbol x86 only in glibc?
+                         ((".*link_static_lib_as_system_lib.*") "")))))
+                 '())
+          (delete 'check)
+          (add-after 'install 'check
+            (lambda* (#:key tests? #:allow-other-keys)
+              (when tests?
+                (invoke (string-append #$output "/bin/zig")
+                        ;; Testing the standard library takes >7.5GB RAM, and
+                        ;; will fail if it is OOM-killed.  The 'test-toolchain'
+                        ;; target skips standard library and doc tests.
+                        "build" "test-toolchain"
+                        ;; Stage 2 is experimental, not what we run with `zig',
+
+                        "-Dskip-stage2-tests"
+                        ;; Non-native tests try to link and execute non-native
+                        ;; binaries.
+                        "-Dskip-non-native")))))))))
 
 (define-public zig zig-0.10)



reply via email to

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