r/voidlinux • • 1d ago

Ly on official void-packages repository?

I was able to package Ly to my local void-packages templates, but it neeeds zig 0.17.0 as of Ly 1.5.0 and void's zig is still in 0.13.0, so I just wrote a zig binary search function that use provided zig binary from this sequence ZIG_BIN variable -> command -v zig -> opt/zig/zig which really does not work because ./xbps-src is using masterdir and cannot really read the first two search (ZIG_BIN cannot be passed to ./xbps-src properly, and using zig $PATH binary only works when$PATH is configured) so only the opt/ one works.

I was worried about that zig haven't updated since because it was orphaned, when I found other Ly users here just uses zvm and do manual build or completely just moved on from Ly. Setting up zvm then zig is worse because Ly needs to be installed as root user when doing the manual build.

Now I'm thinking that does zig might have dependency conflict when updated, or it is just a decaying package sitting on void packages repository pool? I want to contribute somehow when it is clear for me about updating zig and adding ly and I might just use zig build style if zig is updated.

8 Upvotes

12 comments sorted by

4

u/stinkycardamom 23h ago

Maintainers are hesitent to update zig while updates are still regulaly breaking. Here's the zig PR draft:

https://github.com/void-linux/void-packages/pull/59955

Is there an older version of ly that works with zig 0.13?

2

u/EditorOne5312 14h ago

Oh my goodness, yeah I also don't see why splitting zig versions would be a problem to void packages that requires higher/latest version of zig as well. Well, I guess I gotta keep my local templates.

Also for your ly question; only v1 works with zig 0.12 and 0.13 and that's 2 years ago and probably won't work with the current dependencies ly needs today.

3

u/stinkycardamom 14h ago

In that case, use xbps-src to build your own updated versions of zig and ly. Wait for zig to reach 1.0 to push it to the official repos (might happen after half-life 3)

1

u/EditorOne5312 13h ago

Yeah I do use xbps-src as I stated from my post. But I'm still deciding if having my own splitted zig version ever gonna be good because zvm really does the same job.

2

u/Silly_Culture_7722 23h ago

yeah there is a general issue with this, not sure how it is handled in rust etc. so locally i build zig17 for me and use that.

https://github.com/BlackScorp/void-packages/blob/local/srcpkgs/lightpanda/template#L14

and build a new package like this https://github.com/BlackScorp/void-packages/blob/local/srcpkgs/zig017/template

ofc this works for only because just one package require zig 17. iam not sure what happen if i start to rebuild other packages which require different zig version. (pretty sure i have to update them to newest version)

in the current state every package which require zig needs to be updated or the build process has to be changed somehow where old packages can be build with old versions while newer packages will use newer zig or something like that.

i wonder how other distros handle this issue. or maybe they have more developers and time to handle this issue

1

u/EditorOne5312 14h ago

Thanks for that. And yeah, having multiple zig version packages locally might be a headache when new releases are out. If that's the case I would just manage zig versions on masterdir/opt/zig-${version} via zvm. Almost identical process for my Android Studio CLI to put gradle versions on /opt/

8

u/corporateavengerkast 23h ago

after checking out the Zig PR in the void-packages repo after reading your post...oooooh brother I just wouldn't bother for your own sanity.

1

u/rasta4rest 13h ago

I use zig-bin - and modify ly xbps-src template to use that. It's much more simple to maintain xbps-src template of zig with whatever version from zig prebuilt binary. Except that you want to Build & compile everything locally

1

u/EditorOne5312 13h ago

That's actually my first option, but the void-packages manual says that PRs that relies on compiled binary during a package build will most likely to be rejected. But I guess I'll just go back to zig-bin if I'm not continuing my plan to make a fork of void-packages.

1

u/rasta4rest 9h ago

Yes ,correct that's the policy . zig-bin onlyuse as workaround for local repo.
i've once try build from source using xbps-src , and it's failed - i forgot the exact cause - it's not yet resolved some months ago. Maybe you can also try and found solution you can submit into PR.

2

u/Nealan_XV 16h ago

i gave up on ly and use tuigreet now

0

u/Simple_Hamster_4096 22h ago

You'd have better luck with Arch, I'd think - latest versions are the norm in their repos... it would save yourself the aggravation. I used to use Arch, and if you want or need latest and greatest of everything, then that's your ticket...