hako pushed a commit to branch wip-zig-bootstrap
in repository guix.
commit 1bbaa2c0549648be325636785da6b73bab44f326
Author: NoƩ Lopez <[email protected]>
AuthorDate: Tue Dec 3 23:30:16 2024 +0800
gnu: Add zig-ini.
* gnu/packages/zig-xyz.scm (zig-ini): New variable.
Modified-by: Hilton Chain <[email protected]>
Signed-off-by: Hilton Chain <[email protected]>
Change-Id: I22565fccec0a8904557cd1cdcf94426f3d87af04
---
gnu/packages/zig-xyz.scm | 47 +++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 47 insertions(+)
diff --git a/gnu/packages/zig-xyz.scm b/gnu/packages/zig-xyz.scm
index e2faca0a46..ff19517c80 100644
--- a/gnu/packages/zig-xyz.scm
+++ b/gnu/packages/zig-xyz.scm
@@ -161,6 +161,53 @@ syntax highlighting and run code snippets to ensure they
behave as expected.")
(home-page "https://github.com/kristoff-it/zig-doctest")
(license license:expat))))
+(define-public zig-ini
+ ;; No releases.
+ (let ((commit "e18d36665905c1e7ba0c1ce3e8780076b33e3002")
+ (revision "0"))
+ (package
+ (name "zig-ini")
+ (version (git-version "0.0.0" revision commit))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/ziglibs/ini")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0b1688g6kvcrbr8pbl3glv09fpd27p5z2bif8jmn6km6myq5fs1y"))
+ (modules '((guix build utils)))
+ (snippet
+ #~(substitute* "build.zig"
+ (("addStaticLibrary") "addSharedLibrary")
+ ;; XXX: This executable links to library in Zig cache,
thus
+ ;; having invalid RUNPATH.
+ ((".*b.installArtifact.example_c.*") "")))))
+ (build-system zig-build-system)
+ (arguments
+ (list #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'fix-paths
+ (lambda _
+ (substitute* "example/example.zig"
+ (("example.ini" file)
+ (string-append
+ (zig-source-install-path #$output)
+ "/example/"
+ file))))))))
+ (home-page "https://github.com/ziglibs/ini")
+ (synopsis "INI parser library")
+ (description
+ "This package provides an INI parser library with:
+@itemize
+@item Raw record reading.
+@item Leading/trailing whitespace removal.
+@item Comments based on @code{;} and @code{#}.
+@item C and Zig API.
+@end itemize")
+ (license license:expat))))
+
(define-public zig-known-folders
(let ((commit "1cceeb70e77dec941a4178160ff6c8d05a74de6f")
(revision "0"))