{"id":13611878,"url":"https://github.com/nix-community/zon2nix","last_synced_at":"2026-02-11T13:34:15.619Z","repository":{"id":187083612,"uuid":"676251180","full_name":"nix-community/zon2nix","owner":"nix-community","description":"Convert the dependencies in `build.zig.zon` to a Nix expression [maintainer=@figsoda]","archived":false,"fork":false,"pushed_at":"2026-02-06T00:21:46.000Z","size":100,"stargazers_count":110,"open_issues_count":7,"forks_count":19,"subscribers_count":4,"default_branch":"main","last_synced_at":"2026-02-06T10:27:39.308Z","etag":null,"topics":["build","nix","vendor","zig","zon"],"latest_commit_sha":null,"homepage":"https://discourse.nixos.org/t/31468","language":"Zig","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nix-community.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":"nix-community","open_collective":"nix-community"}},"created_at":"2023-08-08T19:18:56.000Z","updated_at":"2026-02-06T00:21:51.000Z","dependencies_parsed_at":"2023-11-07T16:47:36.378Z","dependency_job_id":"33c5be2a-93de-4053-b25a-6a35a916151f","html_url":"https://github.com/nix-community/zon2nix","commit_stats":{"total_commits":26,"total_committers":3,"mean_commits":8.666666666666666,"dds":0.2692307692307693,"last_synced_commit":"4394c25250810fdeb9559f3cda7a08226ce6e5a7"},"previous_names":["figsoda/zon2nix","nix-community/zon2nix"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/nix-community/zon2nix","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nix-community%2Fzon2nix","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nix-community%2Fzon2nix/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nix-community%2Fzon2nix/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nix-community%2Fzon2nix/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nix-community","download_url":"https://codeload.github.com/nix-community/zon2nix/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nix-community%2Fzon2nix/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29333564,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-11T12:42:24.625Z","status":"ssl_error","status_checked_at":"2026-02-11T12:41:23.344Z","response_time":97,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["build","nix","vendor","zig","zon"],"created_at":"2024-08-01T19:02:16.956Z","updated_at":"2026-02-11T13:34:15.584Z","avatar_url":"https://github.com/nix-community.png","language":"Zig","funding_links":["https://github.com/sponsors/nix-community","https://opencollective.com/nix-community"],"categories":["Zig","Development Tools","Programming Languages","Fundamentals"],"sub_categories":["Zig","Package and Version Manager"],"readme":"# zon2nix\n\nConvert the dependencies in `build.zig.zon` to a Nix expression\n\n## Usage\n\n```bash\nzon2nix \u003e deps.nix\nzon2nix zls \u003e deps.nix\nzon2nix zls/build.zig.zon \u003e deps.nix\n```\n\nTo use the generated file, add this to your Nix expression:\n\n```nix\npostPatch = ''\n  ln -s ${callPackage ./deps.nix { }} $ZIG_GLOBAL_CACHE_DIR/p\n'';\n```\n\n## Example\n\nThis `build.zig.zon` from [zls](https://github.com/zigtools/zls)\n\n```zig\n.{\n    .name = \"zls\",\n    .version = \"0.11.0\",\n\n    .dependencies = .{\n        .known_folders = .{\n            .url = \"https://github.com/ziglibs/known-folders/archive/fa75e1bc672952efa0cf06160bbd942b47f6d59b.tar.gz\",\n            .hash = \"122048992ca58a78318b6eba4f65c692564be5af3b30fbef50cd4abeda981b2e7fa5\",\n        },\n        .diffz = .{\n            .url = \"https://github.com/ziglibs/diffz/archive/90353d401c59e2ca5ed0abe5444c29ad3d7489aa.tar.gz\",\n            .hash = \"122089a8247a693cad53beb161bde6c30f71376cd4298798d45b32740c3581405864\",\n        },\n        .binned_allocator = .{\n            .url = \"https://gist.github.com/antlilja/8372900fcc09e38d7b0b6bbaddad3904/archive/6c3321e0969ff2463f8335da5601986cf2108690.tar.gz\",\n            .hash = \"1220363c7e27b2d3f39de6ff6e90f9537a0634199860fea237a55ddb1e1717f5d6a5\",\n        },\n    },\n}\n```\n\nproduces the following nix expression\n\n```nix\n# generated by zon2nix (https://github.com/nix-community/zon2nix)\n\n{ linkFarm, fetchzip }:\n\nlinkFarm \"zig-packages\" [\n  {\n    name = \"1220363c7e27b2d3f39de6ff6e90f9537a0634199860fea237a55ddb1e1717f5d6a5\";\n    path = fetchzip {\n      url = \"https://gist.github.com/antlilja/8372900fcc09e38d7b0b6bbaddad3904/archive/6c3321e0969ff2463f8335da5601986cf2108690.tar.gz\";\n      hash = \"sha256-m/kr4kmkG2rLkAj5YwvM0HmXTd+chAiQHzYK6ozpWlw=\";\n    };\n  }\n  {\n    name = \"122048992ca58a78318b6eba4f65c692564be5af3b30fbef50cd4abeda981b2e7fa5\";\n    path = fetchzip {\n      url = \"https://github.com/ziglibs/known-folders/archive/fa75e1bc672952efa0cf06160bbd942b47f6d59b.tar.gz\";\n      hash = \"sha256-U/h4bVarq8CFKbFyNXKl3vBRPubYooLxA1xUz3qMGPE=\";\n    };\n  }\n  {\n    name = \"122089a8247a693cad53beb161bde6c30f71376cd4298798d45b32740c3581405864\";\n    path = fetchzip {\n      url = \"https://github.com/ziglibs/diffz/archive/90353d401c59e2ca5ed0abe5444c29ad3d7489aa.tar.gz\";\n      hash = \"sha256-3CdYo6WevT0alRwKmbABahjhFKz7V9rdkDUZ43VtDeU=\";\n    };\n  }\n]\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnix-community%2Fzon2nix","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnix-community%2Fzon2nix","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnix-community%2Fzon2nix/lists"}