Package: guix;
To reply to this bug, email your comments to 74656 AT debbugs.gnu.org.
Toggle the display of automated, internal messages from the tracker.
View this report as an mbox folder, status mbox, maintainer mbox
ekaitz <at> elenq.tech, hako <at> ultrarare.space, bug-guix <at> gnu.org
:bug#74656
; Package guix
.
(Mon, 02 Dec 2024 21:15:02 GMT) Full text and rfc822 format available.Noé Lopez <noe <at> xn--no-cja.eu>
:ekaitz <at> elenq.tech, hako <at> ultrarare.space, bug-guix <at> gnu.org
.
(Mon, 02 Dec 2024 21:15:02 GMT) Full text and rfc822 format available.Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
From: Noé Lopez <noe <at> xn--no-cja.eu> To: bug-guix <at> gnu.org Subject: [wip-zig-bootstrap] zig cache is not updated for dependencies of dependencies Date: Mon, 02 Dec 2024 22:15:44 +0100
[Message part 1 (text/plain, inline)]
Hi, I got my hands on packaging liskvork, a gomoku server. The build fails because dependencies of dependencies are not added to the zig cache, and so can’t be found correctly by the zig build system. I attached a patch that reproduces this, a workaround when reproducing the steps in a local checkout is to call “zig fetch” on the missing dependencies: $ zig fetch /gnu/store/j0x1vl6w2vgr3fz60l4jgyx5gx53af61-zig-httpz-0-0.7d2ddae/src/zig-httpz-0-0.7d2ddae --save=httpz warning: overwriting existing dependency named 'httpz' $ zig build --summary all /home/noe/.cache/zig/p/1220476906a8f57d6cbaaaeb05d44a41311a5bb6ca74bb86bc3aa1467506c241b29b/build.zig.zon:7:20: error: invalid URI: UnexpectedCharacter $ zig fetch /gnu/store/59w4s1g1y4vy4gw3mwn9fjsfcqc5454i-zig-metrics-0-0.fcf9e94/src/zig-metrics-0-0.fcf9e94 --save=metrics $ zig fetch /gnu/store/izxqkxplp7alrh0n3c8j8cv277nqa04a-zig-websocket-0-0.cf89cb8/src/zig-websocket-0-0.cf89cb8 --save=websocket $ zig build --summary all Build Summary: 5/5 steps succeeded install success +- install liskvork success +- zig build-exe liskvork Debug native-native success 3s MaxRSS:276M +- options cached +- options cached This has the issue of adding the packages to build.zig.zon, so a better solution is required. I’m attaching the patch with the liskvork package and dependencies. The error can be reproduced with “./pre-inst-env guix build liskvork”. Have a nice day, Noé
[0001-gnu-liskvork-New-package-and-depencies-WIP.patch (text/x-patch, inline)]
From 6ff4fd23182c315c0389e547ad5654bc0571fcb8 Mon Sep 17 00:00:00 2001 Message-ID: <6ff4fd23182c315c0389e547ad5654bc0571fcb8.1733173878.git.noelopez <at> free.fr> From: =?UTF-8?q?No=C3=A9=20Lopez?= <noelopez <at> free.fr> Date: Mon, 2 Dec 2024 22:10:43 +0100 Subject: [PATCH] gnu: liskvork: New package and depencies WIP. Change-Id: Iaaff549a2f202518e4af7e5bcfb0b58d04e07f40 --- gnu/packages/zig-xyz.scm | 187 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 187 insertions(+) diff --git a/gnu/packages/zig-xyz.scm b/gnu/packages/zig-xyz.scm index d7210af594..b6c250eb64 100644 --- a/gnu/packages/zig-xyz.scm +++ b/gnu/packages/zig-xyz.scm @@ -83,6 +83,193 @@ (define-public zig-known-folders (home-page "https://github.com/ziglibs/known-folders") (license license:expat)))) +(define-public zig-ini + ;; No releases. + (let ((commit "e18d36665905c1e7ba0c1ce3e8780076b33e3002") + (revision "0")) + (package + (name "zig-ini") + (version (git-version "0" revision commit)) + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/ziglibs/ini.git") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0b1688g6kvcrbr8pbl3glv09fpd27p5z2bif8jmn6km6myq5fs1y")))) + (build-system zig-build-system) + (home-page "https://github.com/ziglibs/ini") + (synopsis "Simple INI parser") + (description "INI is a very simple ini-parser library that provides: +@itemize +@item Raw record reading +@item Leading/trailing whitespace removal +@item comments based on ; and # +@item Zig API +@item C API +@end itemize") + (license license:expat)))) + +(define-public zig-metrics + ;; No releases, latest commit from zig-0.13 branch. + (let ((commit "fcf9e94fa54a20f4954e9821801c32e44d407a2f") + (revision "0")) + (package + (name "zig-metrics") + (version (git-version "0" revision commit)) + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/karlseguin/metrics.zig.git") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1vvfy97ak5xwvwv3rkqsgsj644298d3c75645386qf4psija6a25")))) + (build-system zig-build-system) + (arguments (list #:skip-build? #t)) ;fails to build examples + (home-page "https://github.com/karlseguin/metrics.zig") + (synopsis "Prometheus metrics library") + (description "metrics is a library designed for using Prometheus metrics. It +supports, counters, gauges and histograms and the labeled-variant of each.") + (license license:expat)))) + +(define-public zig-logz + ;; No releases, latest commit from zig-0.13 branch. + (let ((commit "5d5bbaeb98ad30cda30c60ab0f2d1a7fb4890676") + (revision "0")) + (package + (name "zig-logz") + (version (git-version "0" revision commit)) + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/karlseguin/log.zig.git") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "01xihyvyx3rpv0kvjh6mg1b99d6agq683q4iyn39nwqb6ma0i0sz")))) + (build-system zig-build-system) + (arguments + (list + #:zig-inputs `(("metrics" ,zig-metrics)))) + (home-page "https://github.com/karlseguin/log.zig") + (synopsis "Structured Logging for Zig") + (description "logz is an opinionated structured logger that outputs to stdout, +stderr, a file or a custom writer using logfmt or JSON. It aims to minimize runtime +memory allocation by using a pool of pre-allocated loggers.") + (license license:expat)))) + +(define-public zig-zul + ;; No releases. + (let ((commit "f122a0079309f88991aa014cb885500a977ca450") + (revision "0")) + (package + (name "zig-zul") + (version (git-version "0" revision commit)) + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/karlseguin/zul.git") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1aajy6ygrzzq089g71yg7nw3fiklfckl606rysibfhg64d1w3pvl")))) + (build-system zig-build-system) + (arguments (list #:tests? #f)) ;fifty-five compilation errors + (home-page "https://www.goblgobl.com/zul/") + (synopsis "Zig utility library") + (description "The purpose of this library is to enhance Zig's standard +library. Much of zul wraps Zig's std to provide simpler APIs for common +tasks (e.g. reading lines from a file). In other cases, new functionality has been +added (e.g. a UUID type). + +Besides Zig's standard library, there are no dependencies. Most functionality is +contained within its own file and can easily be copy and pasted into an existing +library or project.") + (license license:expat)))) + +(define-public zig-websocket + ;; No releases, latest commit from zig-0.13 branch + (let ((commit "cf89cb8b9c61c99982ced19da54890983e226245") + (revision "0")) + (package + (name "zig-websocket") + (version (git-version "0" revision commit)) + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/karlseguin/websocket.zig.git") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1q85pvc1dgyj5zdpk3xav1zgj6857p0nygndz3nc5xlm260hrck8")))) + (build-system zig-build-system) + (home-page "https://github.com/karlseguin/websocket.zig") + (synopsis "WebSocket implementation for Zig") + (description "") + (license license:expat)))) + +(define-public zig-httpz + ;; No releases, latest commit from zig-0.13 branch + (let ((commit "7d2ddae87af9b110783085c0ea6b03985faa4584") + (revision "0")) + (package + (name "zig-httpz") + (version (git-version "0" revision commit)) + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/karlseguin/http.zig.git") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "02hixvyx1r04lg0nzvhkyrqwcwm8m8rs8hm01n2nzw6jv935frh8")))) + (build-system zig-build-system) + (arguments + (list #:zig-inputs + `(("metrics" ,zig-metrics) + ("websocket" ,zig-websocket)))) + (home-page "https://github.com/karlseguin/http.zig") + (synopsis "HTTP/1.1 server for Zig") + (description "") + (license license:expat)))) + +(define-public liskvork + (package + (name "liskvork") + (version "0.5.1") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/liskvork/liskvork") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1x7cif9wpaq7mk1pqmixq3flymrradb6zpx5qnmiihw699zr2xhw")))) + (build-system zig-build-system) + (arguments + (list #:install-source? #f + #:zig-release-type "safe" + #:zig-inputs + `(("ini" ,zig-ini) + ("logz" ,zig-logz) + ("zul" ,zig-zul) + ("httpz" ,zig-httpz)))) + (home-page "https://liskvork.org") + (synopsis "Modern multi-platform gomoku game server.") + (description "liskvork is a modern Gomoku game server that is purpose-built for +AI matches. It is almost completely configurable and backwards compatible with older +AIs made for previous Gomoku managers such as Piskvork.") + (license license:gpl3))) + (define-public river (package (name "river") base-commit: ceb267f7c108050633136b0abbd0964b6f31882c -- 2.46.0
bug-guix <at> gnu.org
:bug#74656
; Package guix
.
(Tue, 03 Dec 2024 01:05:01 GMT) Full text and rfc822 format available.Message #8 received at 74656 <at> debbugs.gnu.org (full text, mbox):
From: Hilton Chain <hako <at> ultrarare.space> To: Noé Lopez <noe <at> xn--no-cja.eu> Cc: Ekaitz Zarraga <ekaitz <at> elenq.tech>, 74656 <at> debbugs.gnu.org Subject: Re: bug#74656: [wip-zig-bootstrap] zig cache is not updated for dependencies of dependencies Date: Tue, 03 Dec 2024 08:43:09 +0800
[Message part 1 (text/plain, inline)]
Hi Noé, On Tue, 03 Dec 2024 05:15:44 +0800, Noé Lopez wrote: > > [1 <text/plain; utf-8 (quoted-printable)>] > Hi, > > I got my hands on packaging liskvork, a gomoku server. The build fails > because dependencies of dependencies are not added to the zig cache, and so > can’t be found correctly by the zig build system. > > I attached a patch that reproduces this, a workaround when reproducing the > steps in a local checkout is to call “zig fetch” on the missing dependencies: > > $ zig fetch /gnu/store/j0x1vl6w2vgr3fz60l4jgyx5gx53af61-zig-httpz-0-0.7d2ddae/src/zig-httpz-0-0.7d2ddae --save=httpz > warning: overwriting existing dependency named 'httpz' > $ zig build --summary all > /home/noe/.cache/zig/p/1220476906a8f57d6cbaaaeb05d44a41311a5bb6ca74bb86bc3aa1467506c241b29b/build.zig.zon:7:20: error: invalid URI: UnexpectedCharacter > $ zig fetch /gnu/store/59w4s1g1y4vy4gw3mwn9fjsfcqc5454i-zig-metrics-0-0.fcf9e94/src/zig-metrics-0-0.fcf9e94 --save=metrics > $ zig fetch /gnu/store/izxqkxplp7alrh0n3c8j8cv277nqa04a-zig-websocket-0-0.cf89cb8/src/zig-websocket-0-0.cf89cb8 --save=websocket > $ zig build --summary all > Build Summary: 5/5 steps succeeded > install success > +- install liskvork success > +- zig build-exe liskvork Debug native-native success 3s MaxRSS:276M > +- options cached > +- options cached > > This has the issue of adding the packages to build.zig.zon, so a better > solution is required. > > I’m attaching the patch with the liskvork package and dependencies. The error > can be reproduced with “./pre-inst-env guix build liskvork”. > > Have a nice day, > Noé Good example, that's the current limitation of #:zig-inputs, and I'm planning to remove it. Please apply the attached patch onto your change. Thanks
[zig-xyz.patch (text/plain, attachment)]
bug-guix <at> gnu.org
:bug#74656
; Package guix
.
(Tue, 03 Dec 2024 09:58:02 GMT) Full text and rfc822 format available.Message #11 received at 74656 <at> debbugs.gnu.org (full text, mbox):
From: Noé Lopez <noe <at> xn--no-cja.eu> To: Hilton Chain <hako <at> ultrarare.space> Cc: Ekaitz Zarraga <ekaitz <at> elenq.tech>, 74656 <at> debbugs.gnu.org Subject: Re: bug#74656: [wip-zig-bootstrap] zig cache is not updated for dependencies of dependencies Date: Tue, 03 Dec 2024 10:56:13 +0100
Hi, Its working well with your changes, do you plan on keeping the snippet syntax for every package? It seems like a lot of boilerplate. Personally I like the #:zig-inputs syntax better, why not keep it and do the snippet in zig-build-system ? Thanks, Noé Hilton Chain <hako <at> ultrarare.space> writes: > Hi Noé, > > On Tue, 03 Dec 2024 05:15:44 +0800, > Noé Lopez wrote: >> >> [1 <text/plain; utf-8 (quoted-printable)>] >> Hi, >> >> I got my hands on packaging liskvork, a gomoku server. The build fails >> because dependencies of dependencies are not added to the zig cache, and so >> can’t be found correctly by the zig build system. >> >> I attached a patch that reproduces this, a workaround when reproducing the >> steps in a local checkout is to call “zig fetch” on the missing dependencies: >> >> $ zig fetch /gnu/store/j0x1vl6w2vgr3fz60l4jgyx5gx53af61-zig-httpz-0-0.7d2ddae/src/zig-httpz-0-0.7d2ddae --save=httpz >> warning: overwriting existing dependency named 'httpz' >> $ zig build --summary all >> /home/noe/.cache/zig/p/1220476906a8f57d6cbaaaeb05d44a41311a5bb6ca74bb86bc3aa1467506c241b29b/build.zig.zon:7:20: error: invalid URI: UnexpectedCharacter >> $ zig fetch /gnu/store/59w4s1g1y4vy4gw3mwn9fjsfcqc5454i-zig-metrics-0-0.fcf9e94/src/zig-metrics-0-0.fcf9e94 --save=metrics >> $ zig fetch /gnu/store/izxqkxplp7alrh0n3c8j8cv277nqa04a-zig-websocket-0-0.cf89cb8/src/zig-websocket-0-0.cf89cb8 --save=websocket >> $ zig build --summary all >> Build Summary: 5/5 steps succeeded >> install success >> +- install liskvork success >> +- zig build-exe liskvork Debug native-native success 3s MaxRSS:276M >> +- options cached >> +- options cached >> >> This has the issue of adding the packages to build.zig.zon, so a better >> solution is required. >> >> I’m attaching the patch with the liskvork package and dependencies. The error >> can be reproduced with “./pre-inst-env guix build liskvork”. >> >> Have a nice day, >> Noé > > Good example, that's the current limitation of #:zig-inputs, and I'm planning to > remove it. > > Please apply the attached patch onto your change. > > Thanks > diff --git a/gnu/packages/zig-xyz.scm b/gnu/packages/zig-xyz.scm > index 027377fa1b..b98a160e27 100644 > --- a/gnu/packages/zig-xyz.scm > +++ b/gnu/packages/zig-xyz.scm > @@ -186,11 +186,20 @@ (define-public zig-logz > (file-name (git-file-name name version)) > (sha256 > (base32 > - "01xihyvyx3rpv0kvjh6mg1b99d6agq683q4iyn39nwqb6ma0i0sz")))) > + "01xihyvyx3rpv0kvjh6mg1b99d6agq683q4iyn39nwqb6ma0i0sz")) > + (modules '((guix build utils))) > + (snippet > + #~(for-each > + (lambda (dep) > + (substitute* "build.zig" > + (((string-append "(b\\.dependency.\")" (car dep)) _ prefix) > + (string-append prefix (cdr dep)))) > + (substitute* "build.zig.zon" > + (((string-append "\\." (car dep))) > + (format #f ".@\"~a\"" (cdr dep))))) > + '(("metrics" . "zig-metrics")))))) > (build-system zig-build-system) > - (arguments > - (list > - #:zig-inputs `(("metrics" ,zig-metrics)))) > + (propagated-inputs (list zig-metrics)) > (home-page "https://github.com/karlseguin/log.zig") > (synopsis "Structured Logging for Zig") > (description "logz is an opinionated structured logger that outputs to stdout, > @@ -265,12 +274,21 @@ (define-public zig-httpz > (file-name (git-file-name name version)) > (sha256 > (base32 > - "02hixvyx1r04lg0nzvhkyrqwcwm8m8rs8hm01n2nzw6jv935frh8")))) > + "02hixvyx1r04lg0nzvhkyrqwcwm8m8rs8hm01n2nzw6jv935frh8")) > + (modules '((guix build utils))) > + (snippet > + #~(for-each > + (lambda (dep) > + (substitute* "build.zig" > + (((string-append "(b\\.dependency.\")" (car dep)) _ prefix) > + (string-append prefix (cdr dep)))) > + (substitute* "build.zig.zon" > + (((string-append "\\." (car dep))) > + (format #f ".@\"~a\"" (cdr dep))))) > + '(("metrics" . "zig-metrics") > + ("websocket" . "zig-websocket")))))) > (build-system zig-build-system) > - (arguments > - (list #:zig-inputs > - `(("metrics" ,zig-metrics) > - ("websocket" ,zig-websocket)))) > + (propagated-inputs (list zig-metrics zig-websocket)) > (home-page "https://github.com/karlseguin/http.zig") > (synopsis "HTTP/1.1 server for Zig") > (description "") > @@ -288,16 +306,26 @@ (define-public liskvork > (file-name (git-file-name name version)) > (sha256 > (base32 > - "1x7cif9wpaq7mk1pqmixq3flymrradb6zpx5qnmiihw699zr2xhw")))) > + "1x7cif9wpaq7mk1pqmixq3flymrradb6zpx5qnmiihw699zr2xhw")) > + (modules '((guix build utils))) > + (snippet > + #~(for-each > + (lambda (dep) > + (substitute* "build.zig" > + (((string-append "(b\\.dependency.\")" (car dep)) _ prefix) > + (string-append prefix (cdr dep)))) > + (substitute* "build.zig.zon" > + (((string-append "\\." (car dep))) > + (format #f ".@\"~a\"" (cdr dep))))) > + '(("ini" . "zig-ini") > + ("logz" . "zig-logz") > + ("zul" . "zig-zul") > + ("httpz" . "zig-httpz")))))) > (build-system zig-build-system) > (arguments > (list #:install-source? #f > - #:zig-release-type "safe" > - #:zig-inputs > - `(("ini" ,zig-ini) > - ("logz" ,zig-logz) > - ("zul" ,zig-zul) > - ("httpz" ,zig-httpz)))) > + #:zig-release-type "safe")) > + (inputs (list zig-httpz zig-ini zig-logz zig-zul)) > (home-page "https://liskvork.org") > (synopsis "Modern multi-platform gomoku game server.") > (description "liskvork is a modern Gomoku game server that is purpose-built for
bug-guix <at> gnu.org
:bug#74656
; Package guix
.
(Tue, 03 Dec 2024 17:09:01 GMT) Full text and rfc822 format available.Message #14 received at 74656 <at> debbugs.gnu.org (full text, mbox):
From: Hilton Chain <hako <at> ultrarare.space> To: Noé Lopez <noe <at> xn--no-cja.eu> Cc: Ekaitz Zarraga <ekaitz <at> elenq.tech>, 74656 <at> debbugs.gnu.org Subject: Re: bug#74656: [wip-zig-bootstrap] zig cache is not updated for dependencies of dependencies Date: Wed, 04 Dec 2024 01:07:37 +0800
On Tue, 03 Dec 2024 17:56:13 +0800, Noé Lopez wrote: > > Its working well with your changes, do you plan on keeping the snippet > syntax for every package? It seems like a lot of boilerplate. I can make it a procedure later, if only using this pattern is enough. > Personally I like the #:zig-inputs syntax better, why not keep it and do > the snippet in zig-build-system ? Metadata for Guix UI, and not repeating the work of inputs propagation.
bug-guix <at> gnu.org
:bug#74656
; Package guix
.
(Wed, 04 Dec 2024 18:04:01 GMT) Full text and rfc822 format available.Message #17 received at 74656 <at> debbugs.gnu.org (full text, mbox):
From: Hilton Chain <hako <at> ultrarare.space> To: Noé Lopez <noe <at> xn--no-cja.eu> Cc: Ekaitz Zarraga <ekaitz <at> elenq.tech>, 74656 <at> debbugs.gnu.org Subject: Re: bug#74656: [wip-zig-bootstrap] zig cache is not updated for dependencies of dependencies Date: Thu, 05 Dec 2024 02:03:05 +0800
Added your packages (except liskvork, please tell me how to use it) to wip-zig-bootstrap. There're various modifications, please see the current definitions.
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.