Skip to content

Commit 5ed0d14

Browse files
committedJan 17, 2025
zon2json-lock/zon2nix: remove file:// url support
Absolute paths won't work in nix sandbox, no point supporting them.
1 parent c22a0c6 commit 5ed0d14

File tree

2 files changed

+1
-6
lines changed

2 files changed

+1
-6
lines changed
 

‎tools/zon2json-lock.nix

+1-5
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,7 @@ writeShellApplication {
6666
printf -- 'fetching (zig fetch): %s\n' "$url" 1>&2
6767
case "$url" in
6868
file://*)
69-
# workaround bug: https://github.com/ziglang/zig/issues/18549
70-
mkdir -p "$tmpdir/tmp"
71-
fname="$(cd "$tmpdir/tmp"; curl -sSL "$url" -O; find . -mindepth 1 -maxdepth 1 -type f)"
72-
zhash2="$(zig fetch "$tmpdir/tmp/$fname" || true)"
73-
rm -rf "$tmpdir/tmp"
69+
error 'unsupported url: %s' "$url"
7470
;;
7571
*)
7672
zhash2="$(zig fetch "$url" || true)"

‎tools/zon2nix.nix

-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@ writeShellApplication {
6666
"git+https" = fetchGitZig { inherit name hash; url = "https://''${path}"; };
6767
http = fetchZig { inherit name hash; url = "http://''${path}"; };
6868
https = fetchZig { inherit name hash; url = "https://''${path}"; };
69-
file = unpackZigArtifact { inherit name; artifact = /. + path; };
7069
};
7170
in fetcher.''${proto};
7271
in linkFarm name [

0 commit comments

Comments
 (0)
Please sign in to comment.