Open nekodjin opened 2 years ago
The Zig compiler is already in the official Arch repos, under community/zig
. This package tracks stable, and so is currently versioned 0.9.1
. I don't know which version of Zig zigup
targets, so that may or may not be adequate. The relationship between zig
and zigup
is interesting - zig
will, being installed by the package manager, almost certainly have higher precedence in PATH
than the compiler versions installed by zigup
, which means that zig
will have to be uninstalled after installing zigup
. However, unless you publish precompiled binaries on the AUR (which, to be clear, you could do), you will need to have a Zig compiler available for the build()
script to run. For these reasons, assuming that the AUR package would build zigup
locally, I would recommend neither listing zig
as a requirement of the zigup
package nor as a conflict; but rather checking in the build()
script whether zig version
returns an appropriate version. On the other hand, if you decide to ship precompiled binaries, I would recommend listing the zig
package explicitly as a conflict of the zigup
package, to prevent it overshadowing the compilers that zigup
installs.
This is great info! We definitely could do precompiled binaries. I think the best scenario is if we could get the zigup zig symlink to be earlier in PATH, then there's no conflict. We could even add a command like 'zigup disable' to disable the zigup symlink to expose the main zig package.
Is there a robust way to perform such PATH manipulation?
Even if there is, I'm not sure I see the benefit to having the zig
package installed if one is using zigup
. For example, I do not have the rustc
/etc. package(s) installed, but rather use rustup
to manage them; I do not have the ghc
/etc. package(s) installed, but rather use ghcup
to manage them.
Ah great, we can follow the same pattern rust/Haskell use the.
I think it would be best, if we made the zigup
package provide zig
, so zigup can be used instead of zig
(this is also what rustup does).
As for the recursive zig dependency problem, we could simply publish a zigup-bin
package.
I've added zigup to the AUR.
Minor nitpick: It would be nice if zigup made use of git submodules for the dependencies that -Dfetch
downloads.
As I understand, since zigup is written in Zig, a pre-requisite to this would be to get Zig onto the AUR first. Anyone feel free to correct me if I'm wrong (I'm not super familiar with the AUR).