1 # generated by zon2nix (https://github.com/Cloudef/zig2nix)
10 name ? "zig-packages",
16 runCommandLocal name { nativeBuildInputs = [ zig ]; } ''
17 hash="$(zig fetch --global-cache-dir "$TMPDIR" ${artifact})"
18 mv "$TMPDIR/p/$hash" "$out"
29 artifact = fetchurl { inherit url hash; };
31 unpackZigArtifact { inherit name artifact; };
40 parts = lib.splitString "#" url;
41 base = lib.elemAt parts 0;
42 rev = lib.elemAt parts 1;
45 inherit name rev hash;
57 parts = lib.splitString "://" url;
58 proto = lib.elemAt parts 0;
59 path = lib.elemAt parts 1;
61 "git+http" = fetchGitZig {
63 url = "http://${path}";
65 "git+https" = fetchGitZig {
67 url = "https://${path}";
71 url = "http://${path}";
75 url = "https://${path}";
77 file = unpackZigArtifact {
87 name = "122014e73fd712190e109950837b97f6143f02d7e2b6986e1db70b6f4aadb5ba6a0d";
88 path = fetchZigArtifact {
90 url = "https://github.com/Hejsil/zig-clap/archive/8c98e6404b22aafc0184e999d8f068b81cc22fa1.tar.gz";
91 hash = "sha256-3P9LyIlq4eNMOe+/jdVJgECfzveSUuRzTf9yhT4t8Zo=";
95 name = "12209b971367b4066d40ecad4728e6fdffc4cc4f19356d424c2de57f5b69ac7a619a";
96 path = fetchZigArtifact {
98 url = "https://github.com/Kawaii-Ash/zigini/archive/0bba97a12582928e097f4074cc746c43351ba4c8.tar.gz";
99 hash = "sha256-OdaJ5tqmk2MPwaAbpK4HRD/CcQCN+Cjj8U63BqUcFMs=";
103 name = "1220b0979ea9891fa4aeb85748fc42bc4b24039d9c99a4d65d893fb1c83e921efad8";
104 path = fetchZigArtifact {
106 url = "https://github.com/ziglibs/ini/archive/e18d36665905c1e7ba0c1ce3e8780076b33e3002.tar.gz";
107 hash = "sha256-RQ6OPJBqqH7PCL+xiI58JT7vnIo6zbwpLWn+byZO5iM=";