unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Bootstrapped Zig now available in Guix master.
  2024-11-29 14:39 Bootstrapping Zig with no binary blobs: status update and call for packages Hilton Chain
@ 2024-12-31 15:39 ` Hilton Chain
  2024-12-31 15:57   ` Ekaitz Zarraga
  0 siblings, 1 reply; 8+ messages in thread
From: Hilton Chain @ 2024-12-31 15:39 UTC (permalink / raw)
  To: guix-devel
  Cc: dan, Efraim Flashner, Ekaitz Zarraga, Motiejus Jakštys,
	Noé Lopez

Hi Guix,

Zig 0.13.0 is now available in master!

It's worth mentioning that some build steps can be used in shell as well:

Reusing packaged dependencies with `unpack-dependencies' from
`(guix build zig-build-system)':
--8<---------------cut here---------------start------------->8---
# Example: river
git clone https://codeberg.org/river/river && cd river && git checkout v0.3.6
guix shell --development river
echo "((assoc-ref (@ (guix build zig-build-system) %standard-phases) 'unpack-dependencies))" | guix repl -t machine
zig build
--8<---------------cut here---------------end--------------->8---

Additionally with `rename-zig-dependencies' from `(gnu packages zig)':
--8<---------------cut here---------------start------------->8---
# Example: zig-zls@0.13
git clone https://github.com/zigtools/zls && cd zls && git checkout 0.13.0
echo "(eval ((@ (gnu packages zig) rename-zig-dependencies) \
        '((\"diffz\" . \"zig-diffz\") \
          (\"known_folders\" . \"zig-known-folders\"))) \
        (interaction-environment))" | guix repl -t machine
guix shell --development zig-zls@0.13
echo "((assoc-ref (@ (guix build zig-build-system) %standard-phases) 'unpack-dependencies))" | guix repl -t machine
zig build
--8<---------------cut here---------------end--------------->8---


Happy New Year :)


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

* Re: Bootstrapped Zig now available in Guix master.
  2024-12-31 15:39 ` Bootstrapped Zig now available in Guix master Hilton Chain
@ 2024-12-31 15:57   ` Ekaitz Zarraga
  2025-01-01  5:25     ` Pjotr Prins
  0 siblings, 1 reply; 8+ messages in thread
From: Ekaitz Zarraga @ 2024-12-31 15:57 UTC (permalink / raw)
  To: Hilton Chain, guix-devel
  Cc: dan, Efraim Flashner, Motiejus Jakštys, Noé Lopez

On 2024-12-31 4:39 PM, Hilton Chain wrote:
> Hi Guix,
> 
> Zig 0.13.0 is now available in master!
> 
> It's worth mentioning that some build steps can be used in shell as well:
> 
> Reusing packaged dependencies with `unpack-dependencies' from
> `(guix build zig-build-system)':
> --8<---------------cut here---------------start------------->8---
> # Example: river
> git clone https://codeberg.org/river/river && cd river && git checkout v0.3.6
> guix shell --development river
> echo "((assoc-ref (@ (guix build zig-build-system) %standard-phases) 'unpack-dependencies))" | guix repl -t machine
> zig build
> --8<---------------cut here---------------end--------------->8---
> 
> Additionally with `rename-zig-dependencies' from `(gnu packages zig)':
> --8<---------------cut here---------------start------------->8---
> # Example: zig-zls@0.13
> git clone https://github.com/zigtools/zls && cd zls && git checkout 0.13.0
> echo "(eval ((@ (gnu packages zig) rename-zig-dependencies) \
>          '((\"diffz\" . \"zig-diffz\") \
>            (\"known_folders\" . \"zig-known-folders\"))) \
>          (interaction-environment))" | guix repl -t machine
> guix shell --development zig-zls@0.13
> echo "((assoc-ref (@ (guix build zig-build-system) %standard-phases) 'unpack-dependencies))" | guix repl -t machine
> zig build
> --8<---------------cut here---------------end--------------->8---
> 
> 
> Happy New Year :)

Oh!

Great achievement!

As told in IRC, I think we should write something about this, in the 
line of the Mono bootstrap post. Zig people would enjoy it, and also 
Guix people.

It's a great opportunity to let people know how hard is to bootstrap 
Zig, Rust and some other languages, and make them focus a little bit 
more on the language bootstrappability.

I offer myself as a reviewer for the blogpost, if you decide to go that 
route and write one.

Thanks for making this. I followed this effort closely, even if I didn't 
have the chance to take part.

Today Guix is a little bit more comfortable for me thanks to this.

Happy New Year.

Ekaitz


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

* Re: Bootstrapped Zig now available in Guix master.
  2024-12-31 15:57   ` Ekaitz Zarraga
@ 2025-01-01  5:25     ` Pjotr Prins
  2025-01-03 14:38       ` Hilton Chain
  2025-01-03 18:01       ` Attila Lendvai
  0 siblings, 2 replies; 8+ messages in thread
From: Pjotr Prins @ 2025-01-01  5:25 UTC (permalink / raw)
  To: Ekaitz Zarraga
  Cc: Hilton Chain, guix-devel, dan, Efraim Flashner,
	Motiejus Jakštys, Noé Lopez

On Tue, Dec 31, 2024 at 04:57:22PM +0100, Ekaitz Zarraga wrote:
> As told in IRC, I think we should write something about this, in the line of
> the Mono bootstrap post. Zig people would enjoy it, and also Guix people.
> 
> It's a great opportunity to let people know how hard is to bootstrap Zig,
> Rust and some other languages, and make them focus a little bit more on the
> language bootstrappability.

Absolutely! Zig is still not in other distros because of this. Julia
has similar problems. The problem is that language developers live in
their own silo, create a self-hosted compiler with binary blob, and
leave it to the distros to figure it out. Hopefully the bootstrap
can carry on and other distros pick up on it. Zig deserves attention.

Great job.

Pj.


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

* Re: Bootstrapped Zig now available in Guix master.
@ 2025-01-02  1:09 Timothy Washington
  2025-01-03 14:20 ` Hilton Chain
  0 siblings, 1 reply; 8+ messages in thread
From: Timothy Washington @ 2025-01-02  1:09 UTC (permalink / raw)
  To: Guix Devel; +Cc: hako

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

Hi there Hilton,

This is a great achievement and I appreciate your work on this. I have my
eye on packaging Ghostty for geeks when I came across your work here. Are
you also eyeing packaging Ghostty as well? If not, then don't mind me. If
so, is there anything a Zig and Guix noob can help with?

Thanks again, for all your effort!

Tim

[-- Attachment #2: Type: text/html, Size: 735 bytes --]

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

* Re: Bootstrapped Zig now available in Guix master.
  2025-01-02  1:09 Bootstrapped Zig now available in Guix master Timothy Washington
@ 2025-01-03 14:20 ` Hilton Chain
  2025-01-05  3:44   ` Timothy Washington
  0 siblings, 1 reply; 8+ messages in thread
From: Hilton Chain @ 2025-01-03 14:20 UTC (permalink / raw)
  To: Timothy Washington; +Cc: Guix Devel

Hi Timothy,

On Thu, 02 Jan 2025 09:09:10 +0800,
Timothy Washington wrote:
>
> Hi there Hilton,
>
> This is a great achievement and I appreciate your work on this. I have my
> eye on packaging Ghostty for geeks when I came across your work here. Are
> you also eyeing packaging Ghostty as well? If not, then don't mind me. If
> so, is there anything a Zig and Guix noob can help with?

I have checked it briefly but I'm not going to package it.  There's one package
in an external channel[1], you can try it there for now.  Note its definition is
currently written in a way that cannot be accepted into Guix.

Examples for Zig packages are available in (gnu packages zig-xyz) module[2], I
think zig-build-system can support Ghostty well, but the package itself is a bit
complex, so I would advise against packaging it if you don't have much
experience.

Thanks
---
[1]: https://toys.whereis.social/?search=ghostty
[2]: https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/packages/zig-xyz.scm


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

* Re: Bootstrapped Zig now available in Guix master.
  2025-01-01  5:25     ` Pjotr Prins
@ 2025-01-03 14:38       ` Hilton Chain
  2025-01-03 18:01       ` Attila Lendvai
  1 sibling, 0 replies; 8+ messages in thread
From: Hilton Chain @ 2025-01-03 14:38 UTC (permalink / raw)
  To: Pjotr Prins
  Cc: Ekaitz Zarraga, guix-devel, dan, Efraim Flashner,
	Motiejus Jakštys, Noé Lopez

On Wed, 01 Jan 2025 13:25:37 +0800,
Pjotr Prins wrote:
>
> On Tue, Dec 31, 2024 at 04:57:22PM +0100, Ekaitz Zarraga wrote:
> > As told in IRC, I think we should write something about this, in the line of
> > the Mono bootstrap post. Zig people would enjoy it, and also Guix people.
> >
> > It's a great opportunity to let people know how hard is to bootstrap Zig,
> > Rust and some other languages, and make them focus a little bit more on the
> > language bootstrappability.
>
> Absolutely! Zig is still not in other distros because of this. Julia
> has similar problems. The problem is that language developers live in
> their own silo, create a self-hosted compiler with binary blob, and
> leave it to the distros to figure it out. Hopefully the bootstrap
> can carry on and other distros pick up on it. Zig deserves attention.

I can try to write a post this month, but please don't have much expectation on
it, I'm in no way good at writing :)


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

* Re: Bootstrapped Zig now available in Guix master.
  2025-01-01  5:25     ` Pjotr Prins
  2025-01-03 14:38       ` Hilton Chain
@ 2025-01-03 18:01       ` Attila Lendvai
  1 sibling, 0 replies; 8+ messages in thread
From: Attila Lendvai @ 2025-01-03 18:01 UTC (permalink / raw)
  To: Pjotr Prins
  Cc: Ekaitz Zarraga, Hilton Chain, guix-devel, i@dan.games,
	efraim@flashner.co.il, motiejus@jakstys.lt, Noé Lopez

> The problem is that language developers live in
> their own silo, create a self-hosted compiler with binary blob, and
> leave it to the distros to figure it out.

which is baffling to me, because i think bootstrapping is one of the more interesting parts of compiler development.

i had the same experience with the Idris2: i made a full bootstrap chain all the way down from GHC, integrated bootstrapping into the normal build process so that bootstrapping remains constantly tested, and also prepared the Guix side... but then my PR was basically ignored.

-- 
• attila lendvai
• PGP: 963F 5D5F 45C7 DFCD 0A39
--
“To every man is given the key to the gates of heaven; the same key opens the gates of hell.

And so it is with science.”
	— Richard Feynman (1918–1988)



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

* Re: Bootstrapped Zig now available in Guix master.
  2025-01-03 14:20 ` Hilton Chain
@ 2025-01-05  3:44   ` Timothy Washington
  0 siblings, 0 replies; 8+ messages in thread
From: Timothy Washington @ 2025-01-05  3:44 UTC (permalink / raw)
  To: Hilton Chain; +Cc: Guix Devel

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

Hey Hilton, thanks for the feedback.

These were the general paths I was looking at.


A . Manually
Guix shell with zig
Build regular Ghostty. Here, I'd follow the official direction on Building
Ghostty from Source.
https://ghostty.org/docs/install/build

Build Ghostty with guix + custom build steps. But it looks like this has
already been done.
https://codeberg.org/look/saayix/src/branch/main/saayix/packages/terminals.scm#L31


B. Using Nix

Can we use the Ghostty Nix package? The Ghostty "official build environment
is defined by Nix. You do not need to use Nix to build Ghostty, but the Nix
environment is the environment which runs CI tests and builds release
artifacts, so it is the most reliable way to build Ghostty" (ref).
https://ghostty.org/docs/install/build

The Ghostty "Build from Source / Building with Nix" section describes how
to set up the Nix environment.
https://ghostty.org/docs/install/build#building-with-nix

But Guix comes with a service for using Nix packages. "GNU Guix Reference
Manual / Miscellaneous Services".
https://guix.gnu.org/manual/en/html_node/Miscellaneous-Services.html#index-nix_002dservice_002dtype


C. But you're saying that the Toys external channel already packaged it.
https://toys.whereis.social/?search=ghostty

"Note its definition is currently written in a way that cannot be accepted
into Guix."
I'm fine with that for the moment. I think Ghostty is open source. So we
can play around with it to make the packaging more canonical.

I'll take a look at the examples for Zig packages in the (gnu packages
zig-xyz) module.
https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/packages/zig-xyz.scm

I'm confident that the zig-build-system, or some modification of it, can
support Ghostty. It's just a matter of if I can do it, lol :)

But this sets me on the path. I really appreciate your feedback on this 👏🏿


Cheers
Tim


On Fri, 3 Jan 2025 at 09:41, Hilton Chain <hako@ultrarare.space> wrote:

> Hi Timothy,
>
> On Thu, 02 Jan 2025 09:09:10 +0800,
> Timothy Washington wrote:
> >
> > Hi there Hilton,
> >
> > This is a great achievement and I appreciate your work on this. I have my
> > eye on packaging Ghostty for geeks when I came across your work here. Are
> > you also eyeing packaging Ghostty as well? If not, then don't mind me. If
> > so, is there anything a Zig and Guix noob can help with?
>
> I have checked it briefly but I'm not going to package it.  There's one
> package
> in an external channel[1], you can try it there for now.  Note its
> definition is
> currently written in a way that cannot be accepted into Guix.
>
> Examples for Zig packages are available in (gnu packages zig-xyz)
> module[2], I
> think zig-build-system can support Ghostty well, but the package itself is
> a bit
> complex, so I would advise against packaging it if you don't have much
> experience.
>
> Thanks
> ---
> [1]: https://toys.whereis.social/?search=ghostty
> [2]:
> https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/packages/zig-xyz.scm
>

[-- Attachment #2: Type: text/html, Size: 4676 bytes --]

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

end of thread, other threads:[~2025-01-05  3:45 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-02  1:09 Bootstrapped Zig now available in Guix master Timothy Washington
2025-01-03 14:20 ` Hilton Chain
2025-01-05  3:44   ` Timothy Washington
  -- strict thread matches above, loose matches on Subject: below --
2024-11-29 14:39 Bootstrapping Zig with no binary blobs: status update and call for packages Hilton Chain
2024-12-31 15:39 ` Bootstrapped Zig now available in Guix master Hilton Chain
2024-12-31 15:57   ` Ekaitz Zarraga
2025-01-01  5:25     ` Pjotr Prins
2025-01-03 14:38       ` Hilton Chain
2025-01-03 18:01       ` Attila Lendvai

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).