guix-commits
[Top][All Lists]
Advanced

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

01/60: gnu: zig: Add 'zig-source' procedure.


From: guix-commits
Subject: 01/60: gnu: zig: Add 'zig-source' procedure.
Date: Mon, 18 Nov 2024 07:16:46 -0500 (EST)

hako pushed a commit to branch wip-zig-bootstrap
in repository guix.

commit 8e7a0dfe2bdd21145db5e7d1c120a60587b19b64
Author: Efraim Flashner <efraim@flashner.co.il>
AuthorDate: Tue Nov 12 17:31:32 2024 +0800

    gnu: zig: Add 'zig-source' procedure.
    
    * gnu/packages/zig.scm (zig-source): New procedure.
    
    Change-Id: I2ca2cbb3756ebb61f0e3f821e91785ec89ac0c80
---
 gnu/packages/zig.scm | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/gnu/packages/zig.scm b/gnu/packages/zig.scm
index 6994d48818..bae66a4692 100644
--- a/gnu/packages/zig.scm
+++ b/gnu/packages/zig.scm
@@ -31,6 +31,21 @@
   #:use-module (gnu packages llvm)
   #:use-module (gnu packages llvm-meta))
 
+(define (zig-source version commit hash)
+  (origin
+    (method git-fetch)
+    (uri (git-reference
+          (url "https://github.com/ziglang/zig";)
+          (commit commit)))
+    (file-name (git-file-name "zig" version))
+    (sha256 (base32 hash))
+    (snippet
+     #~(for-each (lambda (file)
+                   (when (file-exists? file)
+                     (delete-file file)))
+                 '("stage1/zig1.wasm"
+                   "stage1/zig1.wasm.zst")))))
+
 (define-public zig-0.9
   (package
     (name "zig")



reply via email to

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