unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#66723] [PATCH 0/3] gnu: zig-0.10: Inherit from zig-0.9.
@ 2023-10-24  8:23 Hilton Chain via Guix-patches via
  2023-10-24  8:34 ` [bug#66723] [PATCH 1/3] gnu: zig-0.10: Use gexp Hilton Chain via Guix-patches via
                   ` (4 more replies)
  0 siblings, 5 replies; 9+ messages in thread
From: Hilton Chain via Guix-patches via @ 2023-10-24  8:23 UTC (permalink / raw)
  To: 66723; +Cc: Hilton Chain

This series applies gexp to package arguments of zig@0.9 and zig@0.10, and
makes the latter inherit from the former.

I have already packaged zig@0.11, which depends on LLVM 16
(https://issues.guix.gnu.org/66701), will send the patch soon.

Hilton Chain (3):
  gnu: zig-0.10: Use gexp.
  gnu: zig-0.9: Use gexp.
  gnu: zig-0.10: Inherit from zig-0.9.

 gnu/packages/zig.scm | 215 +++++++++++++++++++++----------------------
 1 file changed, 107 insertions(+), 108 deletions(-)


base-commit: be223a9451cc7bf7437c8fb2ee13f6ed726e6097
--
2.41.0




^ permalink raw reply	[flat|nested] 9+ messages in thread

* [bug#66723] [PATCH 1/3] gnu: zig-0.10: Use gexp.
  2023-10-24  8:23 [bug#66723] [PATCH 0/3] gnu: zig-0.10: Inherit from zig-0.9 Hilton Chain via Guix-patches via
@ 2023-10-24  8:34 ` Hilton Chain via Guix-patches via
  2023-10-24  8:34 ` [bug#66723] [PATCH 2/3] gnu: zig-0.9: " Hilton Chain via Guix-patches via
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 9+ messages in thread
From: Hilton Chain via Guix-patches via @ 2023-10-24  8:34 UTC (permalink / raw)
  To: 66723; +Cc: Hilton Chain

* gnu/packages/zig.scm (zig-0.10)[arguments]: Use gexp.

Change-Id: I8ba6a4bd92784637cd3a4448e2f99ed521a17f3a
---
 gnu/packages/zig.scm | 79 ++++++++++++++++++++++----------------------
 1 file changed, 40 insertions(+), 39 deletions(-)

diff --git a/gnu/packages/zig.scm b/gnu/packages/zig.scm
index dcca9a1121..882e5426dc 100644
--- a/gnu/packages/zig.scm
+++ b/gnu/packages/zig.scm
@@ -20,6 +20,7 @@
 ;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
 
 (define-module (gnu packages zig)
+  #:use-module (guix gexp)
   #:use-module (guix packages)
   #:use-module (guix utils)
   #:use-module (guix git-download)
@@ -53,45 +54,45 @@ (define-public zig-0.10
     (native-inputs
      (list llvm-15))
     (arguments
-     `(#:configure-flags
-       (list ,@(if (%current-target-system)
-                   '(string-append "-DZIG_TARGET_TRIPLE="
-                                   (%current-target-system))
-                   '())
-             (string-append "-DZIG_TARGET_MCPU=baseline")
-             "-DZIG_SHARED_LLVM=ON"
-             (string-append "-DZIG_LIB_DIR=" (assoc-ref %outputs "out")
-                            "/lib/zig"))
-       #:validate-runpath? #f       ; TODO: zig binary can't find ld-linux.
-       #:out-of-source? #f ; for tests
-       #:phases
-       (modify-phases %standard-phases
-         (add-after 'unpack 'set-env-variables
-           (lambda* (#:key inputs native-inputs #:allow-other-keys)
-             ;; Set CC, since the stage 2 zig relies on it to find the libc
-             ;; installation, and otherwise silently links against its own.
-             (setenv "CC" ,(cc-for-target))
-             ;; Set cache dir, otherwise Zig looks for `$HOME/.cache'.
-             (setenv "ZIG_GLOBAL_CACHE_DIR"
-                     (string-append (getcwd) "/zig-cache"))))
-         (add-after 'patch-source-shebangs 'patch-more-shebangs
-           (lambda* (#:key inputs #:allow-other-keys)
-             ;; Zig uses information about /usr/bin/env to determine the
-             ;; version of glibc and other data.
-             (substitute* "lib/std/zig/system/NativeTargetInfo.zig"
-               (("/usr/bin/env") (search-input-file inputs "/bin/env")))))
-         (delete 'check)
-         (add-after 'install 'check
-           (lambda* (#:key outputs tests? #:allow-other-keys)
-             (when tests?
-               (invoke (string-append (assoc-ref outputs "out") "/bin/zig")
-                       "build" "test"
-                       ;; We're not testing the compiler bootstrap chain.
-                       "-Dskip-stage1"
-                       "-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)))
+                     '())
+              "-DZIG_TARGET_MCPU=baseline"
+              "-DZIG_SHARED_LLVM=ON"
+              (string-append "-DZIG_LIB_DIR=" #$output "/lib/zig"))
+      #:validate-runpath? #f            ;TODO: zig binary can't find ld-linux.
+      #:out-of-source? #f               ;for tests
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'unpack 'set-env-variables
+            (lambda _
+              ;; Set CC, since the stage 2 zig relies on it to find the libc
+              ;; installation, and otherwise silently links against its own.
+              (setenv "CC" #$(cc-for-target))
+              ;; Set cache dir, otherwise Zig looks for `$HOME/.cache'.
+              (setenv "ZIG_GLOBAL_CACHE_DIR"
+                      (string-append (getcwd) "/zig-cache"))))
+          (add-after 'patch-source-shebangs 'patch-more-shebangs
+            (lambda* (#:key inputs #:allow-other-keys)
+              ;; Zig uses information about /usr/bin/env to determine the
+              ;; version of glibc and other data.
+              (substitute* "lib/std/zig/system/NativeTargetInfo.zig"
+                (("/usr/bin/env") (search-input-file inputs "/bin/env")))))
+          (delete 'check)
+          (add-after 'install 'check
+            (lambda* (#:key tests? #:allow-other-keys)
+              (when tests?
+                (invoke (string-append #$output "/bin/zig")
+                        "build" "test"
+                        ;; We're not testing the compiler bootstrap chain.
+                        "-Dskip-stage1"
+                        "-Dskip-stage2-tests"
+                        ;; Non-native tests try to link and execute non-native
+                        ;; binaries.
+                        "-Dskip-non-native")))))))
     (native-search-paths
      (list
       (search-path-specification
-- 
2.41.0





^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [bug#66723] [PATCH 2/3] gnu: zig-0.9: Use gexp.
  2023-10-24  8:23 [bug#66723] [PATCH 0/3] gnu: zig-0.10: Inherit from zig-0.9 Hilton Chain via Guix-patches via
  2023-10-24  8:34 ` [bug#66723] [PATCH 1/3] gnu: zig-0.10: Use gexp Hilton Chain via Guix-patches via
@ 2023-10-24  8:34 ` Hilton Chain via Guix-patches via
  2023-10-24  8:34 ` [bug#66723] [PATCH 3/3] gnu: zig-0.10: Inherit from zig-0.9 Hilton Chain via Guix-patches via
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 9+ messages in thread
From: Hilton Chain via Guix-patches via @ 2023-10-24  8:34 UTC (permalink / raw)
  To: 66723; +Cc: Hilton Chain

* 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 @@ (define-public zig-0.9
     (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)
-- 
2.41.0





^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [bug#66723] [PATCH 3/3] gnu: zig-0.10: Inherit from zig-0.9.
  2023-10-24  8:23 [bug#66723] [PATCH 0/3] gnu: zig-0.10: Inherit from zig-0.9 Hilton Chain via Guix-patches via
  2023-10-24  8:34 ` [bug#66723] [PATCH 1/3] gnu: zig-0.10: Use gexp Hilton Chain via Guix-patches via
  2023-10-24  8:34 ` [bug#66723] [PATCH 2/3] gnu: zig-0.9: " Hilton Chain via Guix-patches via
@ 2023-10-24  8:34 ` Hilton Chain via Guix-patches via
  2023-11-19 11:35 ` [bug#66723] [PATCH 0/3] " guix-patches--- via
  2023-11-22 12:12 ` [bug#66723] " Ludovic Courtès
  4 siblings, 0 replies; 9+ messages in thread
From: Hilton Chain via Guix-patches via @ 2023-10-24  8:34 UTC (permalink / raw)
  To: 66723; +Cc: Hilton Chain

* gnu/packages/zig.scm (zig-0.9): Expand definition.
(zig-0.10): Inherit from zig-0.9.

Change-Id: I36c273ac3f08982f598fa934571c1b83437cb977
---
 gnu/packages/zig.scm | 179 +++++++++++++++++++++----------------------
 1 file changed, 88 insertions(+), 91 deletions(-)

diff --git a/gnu/packages/zig.scm b/gnu/packages/zig.scm
index bc3e1c019a..08ee650d8b 100644
--- a/gnu/packages/zig.scm
+++ b/gnu/packages/zig.scm
@@ -30,10 +30,10 @@ (define-module (gnu packages zig)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages llvm))
 
-(define-public zig-0.10
+(define-public zig-0.9
   (package
     (name "zig")
-    (version "0.10.1")
+    (version "0.9.1")
     (source
      (origin
        (method git-fetch)
@@ -42,57 +42,66 @@ (define-public zig-0.10
              (commit version)))
        (file-name (git-file-name name version))
        (sha256
-        (base32 "1sh5xjsksl52i4cfv1qj36sz5h0ln7cq4pdhgs3960mk8a90im7b"))
-       (patches (search-patches "zig-do-not-link-against-librt.patch"))))
+        (base32 "0nfvgg23sw50ksy0z0ml6lkdsvmd0278mq29m23dbb2jsirkhry7"))
+       (patches (search-patches "zig-0.9-riscv-support.patch"
+                                "zig-use-system-paths.patch"
+                                "zig-do-not-link-against-librt.patch"))))
     (build-system cmake-build-system)
-    (inputs
-     (list clang-15 ; Clang propagates llvm.
-           lld-15
-           zlib
-           (list zstd "lib")))
-    ;; Zig compiles fine with GCC, but also needs native LLVM libraries.
-    (native-inputs
-     (list llvm-15))
     (arguments
      (list
       #:configure-flags
       #~(list #$@(if (%current-target-system)
                      (list (string-append "-DZIG_TARGET_TRIPLE="
                                           (%current-target-system)))
-                     '())
-              "-DZIG_TARGET_MCPU=baseline"
-              "-DZIG_SHARED_LLVM=ON"
-              (string-append "-DZIG_LIB_DIR=" #$output "/lib/zig"))
-      #:validate-runpath? #f            ;TODO: zig binary can't find ld-linux.
-      #:out-of-source? #f               ;for tests
+                     '()))
+      #: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 'unpack 'set-env-variables
+          #$@(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.*") "")))))
+                 '())
+          (add-after 'configure 'set-cache-dir
             (lambda _
-              ;; Set CC, since the stage 2 zig relies on it to find the libc
-              ;; installation, and otherwise silently links against its own.
-              (setenv "CC" #$(cc-for-target))
               ;; Set cache dir, otherwise Zig looks for `$HOME/.cache'.
               (setenv "ZIG_GLOBAL_CACHE_DIR"
                       (string-append (getcwd) "/zig-cache"))))
-          (add-after 'patch-source-shebangs 'patch-more-shebangs
-            (lambda* (#:key inputs #:allow-other-keys)
-              ;; Zig uses information about /usr/bin/env to determine the
-              ;; version of glibc and other data.
-              (substitute* "lib/std/zig/system/NativeTargetInfo.zig"
-                (("/usr/bin/env") (search-input-file inputs "/bin/env")))))
           (delete 'check)
           (add-after 'install 'check
             (lambda* (#:key tests? #:allow-other-keys)
               (when tests?
                 (invoke (string-append #$output "/bin/zig")
-                        "build" "test"
-                        ;; We're not testing the compiler bootstrap chain.
-                        "-Dskip-stage1"
+                        ;; 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")))))))
+    (inputs
+     (list clang-13                     ;Clang propagates llvm.
+           lld-13))
+    ;; Zig compiles fine with GCC, but also needs native LLVM libraries.
+    (native-inputs
+     (list llvm-13))
     (native-search-paths
      (list
       (search-path-specification
@@ -123,11 +132,11 @@ (define-public zig-0.10
     (properties `((max-silent-time . 9600)))
     (license license:expat)))
 
-(define-public zig-0.9
+(define-public zig-0.10
   (package
-    (inherit zig-0.10)
+    (inherit zig-0.9)
     (name "zig")
-    (version "0.9.1")
+    (version "0.10.1")
     (source
      (origin
        (method git-fetch)
@@ -136,64 +145,52 @@ (define-public zig-0.9
              (commit version)))
        (file-name (git-file-name name version))
        (sha256
-        (base32 "0nfvgg23sw50ksy0z0ml6lkdsvmd0278mq29m23dbb2jsirkhry7"))
-       (patches (search-patches "zig-0.9-riscv-support.patch"
-                                "zig-use-system-paths.patch"
-                                "zig-do-not-link-against-librt.patch"))))
+        (base32 "1sh5xjsksl52i4cfv1qj36sz5h0ln7cq4pdhgs3960mk8a90im7b"))
+       (patches (search-patches "zig-do-not-link-against-librt.patch"))))
+    (arguments
+     (substitute-keyword-arguments (package-arguments zig-0.9)
+       ((#:configure-flags flags ''())
+        #~(cons* "-DZIG_TARGET_MCPU=baseline"
+                 "-DZIG_SHARED_LLVM=ON"
+                 (string-append "-DZIG_LIB_DIR=" #$output "/lib/zig")
+                 #$flags))
+       ;; TODO: zig binary can't find ld-linux.
+       ((#:validate-runpath? _ #t) #f)
+       ((#:tests? _ #t) #t)
+       ((#:phases phases '%standard-phases)
+        #~(modify-phases #$phases
+            #$@(if (target-riscv64?)
+                   `((delete 'adjust-tests))
+                   '())
+            (add-after 'unpack 'set-CC
+              (lambda _
+                ;; Set CC, since the stage 2 zig relies on it to find the libc
+                ;; installation, and otherwise silently links against its own.
+                (setenv "CC" #$(cc-for-target))))
+            (add-after 'patch-source-shebangs 'patch-more-shebangs
+              (lambda* (#:key inputs #:allow-other-keys)
+                ;; Zig uses information about /usr/bin/env to determine the
+                ;; version of glibc and other data.
+                (substitute* "lib/std/zig/system/NativeTargetInfo.zig"
+                  (("/usr/bin/env") (search-input-file inputs "/bin/env")))))
+            (replace 'check
+              (lambda* (#:key tests? #:allow-other-keys)
+                (when tests?
+                  (invoke (string-append #$output "/bin/zig")
+                          "build" "test"
+                          ;; We're not testing the compiler bootstrap chain.
+                          "-Dskip-stage1"
+                          "-Dskip-stage2-tests"
+                          ;; Non-native tests try to link and execute non-native
+                          ;; binaries.
+                          "-Dskip-non-native"))))))))
     (inputs
-     (list clang-13 ; Clang propagates llvm.
-           lld-13))
-    ;; Zig compiles fine with GCC, but also needs native LLVM libraries.
+     (modify-inputs (package-inputs zig-0.9)
+       (prepend zlib `(,zstd "lib"))
+       (replace "clang" clang-15)
+       (replace "lld" lld-15)))
     (native-inputs
-     (list llvm-13))
-    (arguments
-     (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")))))))))
+     (modify-inputs (package-native-inputs zig-0.9)
+       (replace "llvm" llvm-15)))))
 
 (define-public zig zig-0.10)
-- 
2.41.0





^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [bug#66723] [PATCH 0/3] gnu: zig-0.10: Inherit from zig-0.9.
  2023-10-24  8:23 [bug#66723] [PATCH 0/3] gnu: zig-0.10: Inherit from zig-0.9 Hilton Chain via Guix-patches via
                   ` (2 preceding siblings ...)
  2023-10-24  8:34 ` [bug#66723] [PATCH 3/3] gnu: zig-0.10: Inherit from zig-0.9 Hilton Chain via Guix-patches via
@ 2023-11-19 11:35 ` guix-patches--- via
  2023-11-23 15:23   ` Hilton Chain via Guix-patches via
  2023-11-22 12:12 ` [bug#66723] " Ludovic Courtès
  4 siblings, 1 reply; 9+ messages in thread
From: guix-patches--- via @ 2023-11-19 11:35 UTC (permalink / raw)
  To: 66723

[-- Attachment #1: Type: text/plain, Size: 271 bytes --]

Should we keep Zig 0.9?  All currently packaged Zig programs
requires it anymore AFAICT, and the language is immature enough
I'd argue we should only keep older versions when necessary.

Your patchset adding LLVM 16 has been applied BTW,
I can't wait for Zig 0.11!

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 687 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [bug#66723] [PATCH 0/3] gnu: zig-0.10: Inherit from zig-0.9.
  2023-10-24  8:23 [bug#66723] [PATCH 0/3] gnu: zig-0.10: Inherit from zig-0.9 Hilton Chain via Guix-patches via
                   ` (3 preceding siblings ...)
  2023-11-19 11:35 ` [bug#66723] [PATCH 0/3] " guix-patches--- via
@ 2023-11-22 12:12 ` Ludovic Courtès
  4 siblings, 0 replies; 9+ messages in thread
From: Ludovic Courtès @ 2023-11-22 12:12 UTC (permalink / raw)
  To: Hilton Chain; +Cc: 66723

Hi Hilton,

Hilton Chain <hako@ultrarare.space> skribis:

> This series applies gexp to package arguments of zig@0.9 and zig@0.10, and
> makes the latter inherit from the former.
>
> I have already packaged zig@0.11, which depends on LLVM 16
> (https://issues.guix.gnu.org/66701), will send the patch soon.
>
> Hilton Chain (3):
>   gnu: zig-0.10: Use gexp.
>   gnu: zig-0.9: Use gexp.
>   gnu: zig-0.10: Inherit from zig-0.9.

It’s been a while, and I think this patch series can go in.

As Nguyễn Gia Phong, we should question whether to keep zig 0.9, but
that can come later.

Thanks!

Ludo’.




^ permalink raw reply	[flat|nested] 9+ messages in thread

* [bug#66723] [PATCH 0/3] gnu: zig-0.10: Inherit from zig-0.9.
  2023-11-19 11:35 ` [bug#66723] [PATCH 0/3] " guix-patches--- via
@ 2023-11-23 15:23   ` Hilton Chain via Guix-patches via
  2023-11-23 16:23     ` Ekaitz Zarraga
  2023-11-25 14:10     ` bug#66723: " Hilton Chain via Guix-patches via
  0 siblings, 2 replies; 9+ messages in thread
From: Hilton Chain via Guix-patches via @ 2023-11-23 15:23 UTC (permalink / raw)
  To: 66723; +Cc: Nguyễn Gia Phong, Ludovic Courtès, Ekaitz Zarraga

Hi,

On Sun, 19 Nov 2023 19:35:13 +0800, Nguyễn Gia Phong wrote:
>
> Should we keep Zig 0.9?  All currently packaged Zig programs requires it
> anymore AFAICT, and the language is immature enough I'd argue we should only
> keep older versions when necessary.
>
> Your patchset adding LLVM 16 has been applied BTW, I can't wait for Zig 0.11!


I didn't realise that Zig 0.11 includes a binary file when sending the cover
letter.  So I haven't bootstrapped it yet, sorry that I didn't mention this
earlier...

Though Zig 0.11 is not bootstrapped, here's a patch to use it at the moment:
https://paste.sr.ht/~hako/c6fb3a872c1e91a09500bf1288e128215ca80d12


I have no experience in both bootstrapping and Zig, so I don't know exactly what
to do further.

(Cc-ed Ekaitz since they are more familiar with the topic)

For Zig I think the first step is to create a path from the last commit that has
a stage1:
    4e2a960b523070c7f8fddf0ea9b6e2a94e31dafe (std.fs: fix openDirAbsolute)
to the addition of the binary file:
    20d86d9c63476b6312b87dc5b0e4aa4822eb7717 (add zig1.wasm.zst)

But for now I'm not sure how.


On Wed, 22 Nov 2023 20:12:43 +0800, Ludovic Courtès wrote:
>
> Hi Hilton,
>
> Hilton Chain <hako@ultrarare.space> skribis:
>
> > This series applies gexp to package arguments of zig@0.9 and zig@0.10, and
> > makes the latter inherit from the former.
> >
> > I have already packaged zig@0.11, which depends on LLVM 16
> > (https://issues.guix.gnu.org/66701), will send the patch soon.
> >
> > Hilton Chain (3):
> >   gnu: zig-0.10: Use gexp.
> >   gnu: zig-0.9: Use gexp.
> >   gnu: zig-0.10: Inherit from zig-0.9.
>
> It’s been a while, and I think this patch series can go in.
>
> As Nguyễn Gia Phong, we should question whether to keep zig 0.9, but that can
> come later.


Thank you!  I'll push the series this weenkend.




^ permalink raw reply	[flat|nested] 9+ messages in thread

* [bug#66723] [PATCH 0/3] gnu: zig-0.10: Inherit from zig-0.9.
  2023-11-23 15:23   ` Hilton Chain via Guix-patches via
@ 2023-11-23 16:23     ` Ekaitz Zarraga
  2023-11-25 14:10     ` bug#66723: " Hilton Chain via Guix-patches via
  1 sibling, 0 replies; 9+ messages in thread
From: Ekaitz Zarraga @ 2023-11-23 16:23 UTC (permalink / raw)
  To: Hilton Chain, 66723; +Cc: Nguyễn Gia Phong, Ludovic Courtès

Hi,

On 11/23/23 16:23, Hilton Chain wrote:
> Hi,
> 
> On Sun, 19 Nov 2023 19:35:13 +0800, Nguyễn Gia Phong wrote:
>>
>> Should we keep Zig 0.9?  All currently packaged Zig programs requires it
>> anymore AFAICT, and the language is immature enough I'd argue we should only
>> keep older versions when necessary.
>>
>> Your patchset adding LLVM 16 has been applied BTW, I can't wait for Zig 0.11!
> 
> 
> I didn't realise that Zig 0.11 includes a binary file when sending the cover
> letter.  So I haven't bootstrapped it yet, sorry that I didn't mention this
> earlier...
> 
> Though Zig 0.11 is not bootstrapped, here's a patch to use it at the moment:
> https://paste.sr.ht/~hako/c6fb3a872c1e91a09500bf1288e128215ca80d12
> 
> 
> I have no experience in both bootstrapping and Zig, so I don't know exactly what
> to do further.

We can talk about how to do it, I'm not sure about it yet.

> (Cc-ed Ekaitz since they are more familiar with the topic)

Thanks for keeping me on the loop. I missed this thread.

> For Zig I think the first step is to create a path from the last commit that has
> a stage1:
>      4e2a960b523070c7f8fddf0ea9b6e2a94e31dafe (std.fs: fix openDirAbsolute)
> to the addition of the binary file:
>      20d86d9c63476b6312b87dc5b0e4aa4822eb7717 (add zig1.wasm.zst)
> 
> But for now I'm not sure how.
> 
> 
> On Wed, 22 Nov 2023 20:12:43 +0800, Ludovic Courtès wrote:
>>
>> Hi Hilton,
>>
>> Hilton Chain <hako@ultrarare.space> skribis:
>>
>>> This series applies gexp to package arguments of zig@0.9 and zig@0.10, and
>>> makes the latter inherit from the former.
>>>
>>> I have already packaged zig@0.11, which depends on LLVM 16
>>> (https://issues.guix.gnu.org/66701), will send the patch soon.
>>>
>>> Hilton Chain (3):
>>>    gnu: zig-0.10: Use gexp.
>>>    gnu: zig-0.9: Use gexp.
>>>    gnu: zig-0.10: Inherit from zig-0.9.
>>
>> It’s been a while, and I think this patch series can go in.
>>
>> As Nguyễn Gia Phong, we should question whether to keep zig 0.9, but that can
>> come later.
> 
> 
> Thank you!  I'll push the series this weenkend.

My 2 cents here:

I made a very similar package to this one on my own. But the tests are 
failing for cross compilation targets. This is not cool. I think you 
just disabled those but we do have an issue reported at Zig 
(https://github.com/ziglang/zig/issues/18063) that is relevant.
I don't mind to leave this as you proposed at the moment, this issue 
will take long to fix, probably.

I just read the changes diagonally but I think my research leads to the 
same resulting package so this patch series look pretty ok to me.

We need to discuss that bootstrapping issue though.
Feel free to reach me in IRC and we can find a solution together, or we 
can continue the discussion here.

I tried to avoid the webassembly thingie using an older zig version 
without it and making the bootstrapping à la rust, but as zig changes 
fast using the previous version as a stage2 compiler simply doesn't 
work. We need to catch some commit in the middle and probably make 
incremental packages until we reach the current zig. Doesn't feel 
reasonable, so we may need to find other kind of solution.

As said, we need to discuss this.

Thanks for the patches and for keeping me on the loop.

Ekaitz




^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#66723: [PATCH 0/3] gnu: zig-0.10: Inherit from zig-0.9.
  2023-11-23 15:23   ` Hilton Chain via Guix-patches via
  2023-11-23 16:23     ` Ekaitz Zarraga
@ 2023-11-25 14:10     ` Hilton Chain via Guix-patches via
  1 sibling, 0 replies; 9+ messages in thread
From: Hilton Chain via Guix-patches via @ 2023-11-25 14:10 UTC (permalink / raw)
  To: 66723-done; +Cc: Nguyễn Gia Phong, Ludovic Courtès, Ekaitz Zarraga

On Thu, 23 Nov 2023 23:23:05 +0800,
Hilton Chain wrote:
> 
[...]
> On Wed, 22 Nov 2023 20:12:43 +0800, Ludovic Courtès wrote:
> >
> > Hi Hilton,
> >
> > Hilton Chain <hako@ultrarare.space> skribis:
> >
> > > This series applies gexp to package arguments of zig@0.9 and zig@0.10, and
> > > makes the latter inherit from the former.
> > >
> > > I have already packaged zig@0.11, which depends on LLVM 16
> > > (https://issues.guix.gnu.org/66701), will send the patch soon.
> > >
> > > Hilton Chain (3):
> > >   gnu: zig-0.10: Use gexp.
> > >   gnu: zig-0.9: Use gexp.
> > >   gnu: zig-0.10: Inherit from zig-0.9.
> >
> > It’s been a while, and I think this patch series can go in.
> >
> > As Nguyễn Gia Phong, we should question whether to keep zig 0.9, but that can
> > come later.
> 
> 
> Thank you!  I'll push the series this weenkend.

Pushed as ca8dda242873...f0682a6388c5.




^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2023-11-26  5:43 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-24  8:23 [bug#66723] [PATCH 0/3] gnu: zig-0.10: Inherit from zig-0.9 Hilton Chain via Guix-patches via
2023-10-24  8:34 ` [bug#66723] [PATCH 1/3] gnu: zig-0.10: Use gexp Hilton Chain via Guix-patches via
2023-10-24  8:34 ` [bug#66723] [PATCH 2/3] gnu: zig-0.9: " Hilton Chain via Guix-patches via
2023-10-24  8:34 ` [bug#66723] [PATCH 3/3] gnu: zig-0.10: Inherit from zig-0.9 Hilton Chain via Guix-patches via
2023-11-19 11:35 ` [bug#66723] [PATCH 0/3] " guix-patches--- via
2023-11-23 15:23   ` Hilton Chain via Guix-patches via
2023-11-23 16:23     ` Ekaitz Zarraga
2023-11-25 14:10     ` bug#66723: " Hilton Chain via Guix-patches via
2023-11-22 12:12 ` [bug#66723] " Ludovic Courtès

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).