# SPDX-FileCopyrightText: © 2026 Jeffrey C. Ollie # SPDX-License-Identifier: MIT { description = "zig-charset"; inputs = { nixpkgs = { url = "https://channels.nixos.org/nixos-unstable/nixexprs.tar.xz"; }; }; outputs = { nixpkgs, ... }: let inherit (nixpkgs) lib; makePackages = system: import nixpkgs { inherit system; }; forAllSystems = lib.genAttrs lib.systems.flakeExposed; zigFor = system: (makePackages system).zig_0_17; in { devShells = forAllSystems ( system: let pkgs = makePackages system; in { default = pkgs.mkShell { name = "zig-charset"; nativeBuildInputs = [ (zigFor system) pkgs.git-pages-cli pkgs.pinact pkgs.reuse # The cross-check: Python's codecs module knows every encoding # in this library except the two WHATWG invented, and # `tools/crosscheck.py` walks all 256 (or 65536) inputs of each # against it. The same Python drives glibc's iconv(3) through # ctypes for `tools/crosscheck_glibc.py`, so the glibc it links # is the glibc the library is checked against, and the tools # refuse to run on any glibc but 2.44. pkgs.python3 ] ++ lib.optionals pkgs.stdenv.hostPlatform.isLinux [ # `iconv -l`, the list of names `tools/glibc_names.py` reads, # from the same glibc. pkgs.glibc.bin ]; }; } ); }; }