# SPDX-FileCopyrightText: © 2026 Jeffrey C. Ollie # 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) ]; }; } ); }; }