|
| 1 | +# generated by zon2nix (https://github.com/Cloudef/zig2nix) |
| 2 | + |
| 3 | +{ |
| 4 | + lib, |
| 5 | + linkFarm, |
| 6 | + fetchurl, |
| 7 | + fetchgit, |
| 8 | + runCommandLocal, |
| 9 | + zig, |
| 10 | + name ? "zig-packages", |
| 11 | +}: |
| 12 | + |
| 13 | +with builtins; |
| 14 | +with lib; |
| 15 | + |
| 16 | +let |
| 17 | + unpackZigArtifact = |
| 18 | + { name, artifact }: |
| 19 | + runCommandLocal name { nativeBuildInputs = [ zig ]; } '' |
| 20 | + hash="$(zig fetch --global-cache-dir "$TMPDIR" ${artifact})" |
| 21 | + mv "$TMPDIR/p/$hash" "$out" |
| 22 | + chmod 755 "$out" |
| 23 | + ''; |
| 24 | + |
| 25 | + fetchZig = |
| 26 | + { |
| 27 | + name, |
| 28 | + url, |
| 29 | + hash, |
| 30 | + }: |
| 31 | + let |
| 32 | + artifact = fetchurl { inherit url hash; }; |
| 33 | + in |
| 34 | + unpackZigArtifact { inherit name artifact; }; |
| 35 | + |
| 36 | + fetchGitZig = |
| 37 | + { |
| 38 | + name, |
| 39 | + url, |
| 40 | + hash, |
| 41 | + rev ? throw "rev is required, remove and regenerate the zon2json-lock file", |
| 42 | + }: |
| 43 | + let |
| 44 | + parts = splitString "#" url; |
| 45 | + url_base = elemAt parts 0; |
| 46 | + url_without_query = elemAt (splitString "?" url_base) 0; |
| 47 | + in |
| 48 | + fetchgit { |
| 49 | + inherit name rev hash; |
| 50 | + url = url_without_query; |
| 51 | + deepClone = false; |
| 52 | + }; |
| 53 | + |
| 54 | + fetchZigArtifact = |
| 55 | + { |
| 56 | + name, |
| 57 | + url, |
| 58 | + hash, |
| 59 | + ... |
| 60 | + }@args: |
| 61 | + let |
| 62 | + parts = splitString "://" url; |
| 63 | + proto = elemAt parts 0; |
| 64 | + path = elemAt parts 1; |
| 65 | + fetcher = { |
| 66 | + "git+http" = fetchGitZig ( |
| 67 | + args |
| 68 | + // { |
| 69 | + url = "http://${path}"; |
| 70 | + } |
| 71 | + ); |
| 72 | + "git+https" = fetchGitZig ( |
| 73 | + args |
| 74 | + // { |
| 75 | + url = "https://${path}"; |
| 76 | + } |
| 77 | + ); |
| 78 | + http = fetchZig { |
| 79 | + inherit name hash; |
| 80 | + url = "http://${path}"; |
| 81 | + }; |
| 82 | + https = fetchZig { |
| 83 | + inherit name hash; |
| 84 | + url = "https://${path}"; |
| 85 | + }; |
| 86 | + }; |
| 87 | + in |
| 88 | + fetcher.${proto}; |
| 89 | +in |
| 90 | +linkFarm name [ |
| 91 | + { |
| 92 | + name = "afl_kit-0.1.0-NdJ3cncdAADtO8S74G1yMYKO1f2XoHputmaJBInsHLp2"; |
| 93 | + path = fetchZigArtifact { |
| 94 | + name = "afl_kit"; |
| 95 | + url = "git+https://github.com/kristoff-it/zig-afl-kit.git#b6cb826f21d4026409caec30a932be462bca27b9"; |
| 96 | + hash = "sha256-b3aBfO1aiM9MV6Pqdy0A8xbRy/X9zEJCztXMe18k2rA="; |
| 97 | + rev = "b6cb826f21d4026409caec30a932be462bca27b9"; |
| 98 | + }; |
| 99 | + } |
| 100 | + { |
| 101 | + name = "AFLplusplus-4.21.0-aA1y4dZxAAAhqDy_JoRw3zwNSg8MenEGP7uJI_xNcYuV"; |
| 102 | + path = fetchZigArtifact { |
| 103 | + name = "AFLplusplus"; |
| 104 | + url = "git+https://github.com/allyourcodebase/AFLplusplus#7e65eb4262688a120bf830d145060aac0e5db920"; |
| 105 | + hash = "sha256-f5Egmkg2tEOV5jfcNj9KTU0IWOAC/hGdypmC+IG88Q0="; |
| 106 | + rev = "7e65eb4262688a120bf830d145060aac0e5db920"; |
| 107 | + }; |
| 108 | + } |
| 109 | + { |
| 110 | + name = "N-V-__8AAKE4uAAJZgEcPdaXnWqoj-IwYf3G2h9YSm-x92gg"; |
| 111 | + path = fetchZigArtifact { |
| 112 | + name = "AFLplusplus"; |
| 113 | + url = "https://github.com/AFLplusplus/AFLplusplus/archive/v4.21c.tar.gz"; |
| 114 | + hash = "sha256-EffHfTfP9uf2WsfMVbq3kB4MYgjoRaOHZDlNBO1WezA="; |
| 115 | + }; |
| 116 | + } |
| 117 | + { |
| 118 | + name = "N-V-__8AAJuttw4mNdQg3ig107ac4uyAhcFPznGHmpnmX58C"; |
| 119 | + path = fetchZigArtifact { |
| 120 | + name = "roc_deps_aarch64_macos_none"; |
| 121 | + url = "https://github.com/roc-lang/roc-bootstrap/releases/download/zig-0.15.1/aarch64-macos-none.tar.xz"; |
| 122 | + hash = "sha256-V5vrynGlea56TSLjNpkVpQFJID+d/U/yMaflwNSQaQU="; |
| 123 | + }; |
| 124 | + } |
| 125 | + { |
| 126 | + name = "N-V-__8AABnBVRNhZGWHvWKm8PO-N4Js4Zr65NnswmkZ0nYX"; |
| 127 | + path = fetchZigArtifact { |
| 128 | + name = "roc_deps_aarch64_linux_musl"; |
| 129 | + url = "https://github.com/roc-lang/roc-bootstrap/releases/download/zig-0.15.1/aarch64-linux-musl.tar.xz"; |
| 130 | + hash = "sha256-CXGVG1A7V/xhpu1Kgv6RtF7EH0xKXlVXWVLOfx8DptA="; |
| 131 | + }; |
| 132 | + } |
| 133 | + { |
| 134 | + name = "N-V-__8AAEbXoBTC007kkcMVW2_P5yIKMxPKQ-L5sYEc3_qH"; |
| 135 | + path = fetchZigArtifact { |
| 136 | + name = "roc_deps_aarch64_windows_gnu"; |
| 137 | + url = "https://github.com/roc-lang/roc-bootstrap/releases/download/zig-0.15.1/aarch64-windows-gnu.zip"; |
| 138 | + hash = "sha256-LbVIeMh8gguUczU7nDqOhmkPlSXIYU5kH6EhcssjpWY="; |
| 139 | + }; |
| 140 | + } |
| 141 | + { |
| 142 | + name = "N-V-__8AAE9SyhMGHGnkgRenWYw-birLp2Nl-IYGqIbdlga3"; |
| 143 | + path = fetchZigArtifact { |
| 144 | + name = "roc_deps_arm_linux_musleabihf"; |
| 145 | + url = "https://github.com/roc-lang/roc-bootstrap/releases/download/zig-0.15.1/arm-linux-musleabihf.tar.xz"; |
| 146 | + hash = "sha256-0fw/KOpzj7OSgFrysfRGv4WlU/JvaaC3xXu6V+LyEs8="; |
| 147 | + }; |
| 148 | + } |
| 149 | + { |
| 150 | + name = "N-V-__8AAGXNmxEQQYT5QBEheV2NJzSQjwaBuUx8wj_tGdoy"; |
| 151 | + path = fetchZigArtifact { |
| 152 | + name = "roc_deps_x86_linux_musl"; |
| 153 | + url = "https://github.com/roc-lang/roc-bootstrap/releases/download/zig-0.15.1/x86-linux-musl.tar.xz"; |
| 154 | + hash = "sha256-LyYtnADq9CmmzRH+qu3WPRHPj2LjY3zszlyCB+CiRAo="; |
| 155 | + }; |
| 156 | + } |
| 157 | + { |
| 158 | + name = "N-V-__8AAL1yjxS0Lef6Fv5mMGaqNa0rGcPJxOftYK0NYuJu"; |
| 159 | + path = fetchZigArtifact { |
| 160 | + name = "roc_deps_x86_64_linux_musl"; |
| 161 | + url = "https://github.com/roc-lang/roc-bootstrap/releases/download/zig-0.15.1/x86_64-linux-musl.tar.xz"; |
| 162 | + hash = "sha256-zmrzXp9790M4NfjFuBU+TZ7jWjJdN+Z1vRs9aKwkmJM="; |
| 163 | + }; |
| 164 | + } |
| 165 | + { |
| 166 | + name = "N-V-__8AAInnSA9gFeMzlB67m7Nu-NYBUOXqDrzYmYgatUHk"; |
| 167 | + path = fetchZigArtifact { |
| 168 | + name = "roc_deps_x86_64_macos_none"; |
| 169 | + url = "https://github.com/roc-lang/roc-bootstrap/releases/download/zig-0.15.1/x86_64-macos-none.tar.xz"; |
| 170 | + hash = "sha256-w3vpIPXWlmIRztbXPGXiemrwYF9jjFIaFxpZaLOZ9KI="; |
| 171 | + }; |
| 172 | + } |
| 173 | + { |
| 174 | + name = "N-V-__8AANpEpBfszYPGDvz9XJK8VRBNG7eQzzK1iNSlkdVG"; |
| 175 | + path = fetchZigArtifact { |
| 176 | + name = "roc_deps_x86_64_windows_gnu"; |
| 177 | + url = "https://github.com/roc-lang/roc-bootstrap/releases/download/zig-0.15.1/x86_64-windows-gnu.zip"; |
| 178 | + hash = "sha256-tckuUDxjoeAUWC5RiHW1IVKG3H67R1D0cONk93VbkLs="; |
| 179 | + }; |
| 180 | + } |
| 181 | + { |
| 182 | + name = "bytebox-0.0.1-SXc2seA2DwAUHbrqTMz_mAQQGqO0EVPYmZ89YZn4KsTi"; |
| 183 | + path = fetchZigArtifact { |
| 184 | + name = "bytebox"; |
| 185 | + url = "git+https://github.com/rdunnington/bytebox#5c8753ba11c394e4d642dddbb459edcd7c97ac26"; |
| 186 | + hash = "sha256-UMXzrH5OPqQmt5B2hlMkKzSa1gjI2EreDRK9Son+ZvM="; |
| 187 | + rev = "5c8753ba11c394e4d642dddbb459edcd7c97ac26"; |
| 188 | + }; |
| 189 | + } |
| 190 | + { |
| 191 | + name = "stable_array-0.1.0-3ihgvVxbAACET5MoiUn2T5ENunG_da_X3kGbji-f4QTF"; |
| 192 | + path = fetchZigArtifact { |
| 193 | + name = "zig-stable-array"; |
| 194 | + url = "git+https://github.com/rdunnington/zig-stable-array#9e4f089bd3abf127eafd307ecf9796455871becc"; |
| 195 | + hash = "sha256-NpxyNyOoFAeyREn3SvEnI/tyaYgM1ZjlcK+0jG2N0Lk="; |
| 196 | + rev = "9e4f089bd3abf127eafd307ecf9796455871becc"; |
| 197 | + }; |
| 198 | + } |
| 199 | + { |
| 200 | + name = "zstd-1.5.7-KEItkJ8vAAC5_rRlKmLflYQ-eKXbAIQBWZNmmJtS18q0"; |
| 201 | + path = fetchZigArtifact { |
| 202 | + name = "zstd"; |
| 203 | + url = "git+https://github.com/allyourcodebase/zstd.git#01327d49cbc56dc24c20a167bb0055d7fc23de84"; |
| 204 | + hash = "sha256-1w+hR2U9t6R4sNvUMynDsYO0sNAan2svjxjUvxT+x6A="; |
| 205 | + rev = "01327d49cbc56dc24c20a167bb0055d7fc23de84"; |
| 206 | + }; |
| 207 | + } |
| 208 | + { |
| 209 | + name = "N-V-__8AAGxifwAAGwXwvsnl_aOXFGLZTeYCu0WBhuEXr96u"; |
| 210 | + path = fetchZigArtifact { |
| 211 | + name = "zstd"; |
| 212 | + url = "git+https://github.com/facebook/zstd.git?ref=v1.5.7#f8745da6ff1ad1e7bab384bd1f9d742439278e99"; |
| 213 | + hash = "sha256-tNFWIT9ydfozB8dWcmTMuZLCQmQudTFJIkSr0aG7S44="; |
| 214 | + rev = "f8745da6ff1ad1e7bab384bd1f9d742439278e99"; |
| 215 | + }; |
| 216 | + } |
| 217 | +] |
0 commit comments