Something went wrong. Try again.
An allocation-free Zig library for parsing, validating, formatting and classifying IPv4 and IPv6 addresses, networks, ranges and endpoints.
Something went wrong. Try again.
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273# SPDX-FileCopyrightText: © 2026 Jeffrey C. Ollie <jeff@ocjtech.us># SPDX-License-Identifier: MIT
{ description = "A Zig library for parsing and validating IPv4 and IPv6 addresses and networks";
inputs = { nixpkgs = { url = "https://channels.nixos.org/nixpkgs-unstable/nixexprs.tar.zst"; }; # The toolchain is the official 0.17.0 release binary, packaged by the # overlay, rather than nixpkgs' Zig. zig = { url = "git+https://git.jcollie.dev/jeff/zig-overlay.git"; inputs.nixpkgs.follows = "nixpkgs"; }; };
outputs = { nixpkgs, zig, ... }: let inherit (nixpkgs) lib; linuxSystems = builtins.filter ( system: (lib.systems.elaborate system).isLinux ) lib.systems.flakeExposed; makePackages = system: import nixpkgs { inherit system; }; zigFor = system: zig.packages.${system}."0.17.0"; forAllSystems = lib.genAttrs linuxSystems; in { packages = forAllSystems ( system: let pkgs = makePackages system; in rec { z46 = pkgs.callPackage ./package.nix { zig = zigFor system; }; default = z46; } );
devShells = forAllSystems ( system: let pkgs = makePackages system; in { default = pkgs.mkShell { name = "z46"; nativeBuildInputs = [ # Uploads zig-out/docs to https://jeff.jcollie.page/z46/; the # workflow runs it through this shell rather than carrying a copy # of its own. pkgs.git-pages-cli pkgs.kcov pkgs.radicle-node pkgs.reuse (zigFor system) ]; }; } ); };}