This is an automated email from the git hooks/post-receive script.
hako pushed a commit to branch wip-zig-bootstrap
in repository guix.
The following commit(s) were added to refs/heads/wip-zig-bootstrap by this push:
new 9d19928a54 squash! build-system: zig: Support Zig package manager.
9d19928a54 is described below
commit 9d19928a54f7a9038a505aa7c333c233be898486
Author: Hilton Chain <[email protected]>
AuthorDate: Tue Dec 31 09:48:38 2024 +0800
squash! build-system: zig: Support Zig package manager.
Change-Id: Ib7c8cbc9d23618aee3955bc7e63b6734046d5597
---
guix/build/zig-build-system.scm | 20 +++++++++++++-------
1 file changed, 13 insertions(+), 7 deletions(-)
diff --git a/guix/build/zig-build-system.scm b/guix/build/zig-build-system.scm
index 94fa440f6d..f380b10507 100644
--- a/guix/build/zig-build-system.scm
+++ b/guix/build/zig-build-system.scm
@@ -100,15 +100,21 @@
(or (and=> (getenv "GUIX_ZIG_PACKAGE_PATH")
(cut string-split <> #\:))
'())))
- ;; zig-aaa-0.1.2-3.456789a -> zig-aaa
- ;; zig-bbb-2.3.3 -> zig-bbb
(define (strip-version input)
- (let* ((name+version (string-split input #\-))
- (guix-revision?
- (not (= (length (string-split (last name+version) #\.))
- 3))))
+ (let ((name+version (string-split input #\-)))
(string-join
- (drop-right name+version (if guix-revision? 2 1))
+ (drop-right name+version
+ (cond
+ ;; aaa-0.0.0
+ ((= 3 (length (string-split (last name+version) #\.)))
+ 1)
+ ;; bbb-0.0.0-0.0000000-output
+ ((and (>= (length name+version) 4)
+ (not (string-contains (last name+version) ".")))
+ 3)
+ ;; ccc-0.0.0-output
+ ;; ddd-0.0.0-0.0000000
+ (else 2)))
"-")))
(for-each
(lambda (build.zig.zon)