You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Zig supports pulling packages from git with this syntax in a dependencies' .url field: git+https://git.mzte.de/mirrors/zig-args.git#89f18a104d9c13763b90e97d6b4ce133da8a3e2b.
zon2nix will naively prepend tarball+ here, resulting in a completely invalid URL for nix flake prefetch. We can fix this by detecting the git+ prefix and converting this to a valid URL for nix, which in my example would be: git+https://git.mzte.de/mirrors/zig-args.git?rev=89f18a104d9c13763b90e97d6b4ce133da8a3e2b.
In the generated deps.nix, we'd then also have to use fetchgit instead of fetchzip. The generated code would look like this in my example:
Zig supports pulling packages from git with this syntax in a dependencies'
.url
field:git+https://git.mzte.de/mirrors/zig-args.git#89f18a104d9c13763b90e97d6b4ce133da8a3e2b
.zon2nix
will naively prependtarball+
here, resulting in a completely invalid URL fornix flake prefetch
. We can fix this by detecting thegit+
prefix and converting this to a valid URL for nix, which in my example would be:git+https://git.mzte.de/mirrors/zig-args.git?rev=89f18a104d9c13763b90e97d6b4ce133da8a3e2b
.In the generated
deps.nix
, we'd then also have to usefetchgit
instead offetchzip
. The generated code would look like this in my example:The text was updated successfully, but these errors were encountered: