Skip to content
Oeiuwq Faith Blog OpenSource Porfolio

Cloudef/nix-zig-stdenv

cross-compile nixpkgs with zig

Cloudef/nix-zig-stdenv.json
{
"createdAt": "2022-10-30T22:26:28Z",
"defaultBranch": "master",
"description": "cross-compile nixpkgs with zig",
"fullName": "Cloudef/nix-zig-stdenv",
"homepage": null,
"language": "Nix",
"name": "nix-zig-stdenv",
"pushedAt": "2024-01-21T04:28:18Z",
"stargazersCount": 48,
"topics": [],
"updatedAt": "2025-03-12T15:44:47Z",
"url": "https://github.com/Cloudef/nix-zig-stdenv"
}

Zig can cross-compile out of the box to many target without having to bootstrap the whole cross-compiler and various libcs This means builds are very fast

  • Generate meta.json with github actions
    • Rank zig versions and targets depending how well they do in tests
  • Provide zigPkgs set with packages maintained in this repo
    • Packages that need major restructuring to compile
    • Minimal versions of existing packages (we are mostly interested in libs only)
    • Packages that do not exist yet in nixpkgs
    • Namespaced for different platforms (c, rust, etc…)
    • Generally zigPkgs is expected to compile and work while pkgs from nixpkg can be hit and miss

For other stuff, run things-to-do