Something went wrong. Try again.
Brotli (RFC 7932) compression and decompression for Zig 0.17, with sans-I/O streaming cores and std.Io adapters.
Something went wrong. Try again.
zig-brotli flake.nix
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869# SPDX-FileCopyrightText: © 2026 Jeffrey C. Ollie <jeff@ocjtech.us># SPDX-License-Identifier: MIT
{ description = "Brotli compression and decompression for Zig, with no I/O";
inputs = { nixpkgs = { url = "https://channels.nixos.org/nixpkgs-unstable/nixexprs.tar.zst"; }; };
outputs = { nixpkgs, ... }: let inherit (nixpkgs) lib; linuxSystems = builtins.filter ( system: (lib.systems.elaborate system).isLinux ) lib.systems.flakeExposed; makePackages = system: import nixpkgs { inherit system; }; zigFor = system: (makePackages system).zig_0_17; forAllSystems = lib.genAttrs linuxSystems; in { packages = forAllSystems ( system: let pkgs = makePackages system; in rec { zig-brotli = pkgs.callPackage ./package.nix { zig = zigFor system; }; default = zig-brotli; } );
devShells = forAllSystems ( system: let pkgs = makePackages system; in { default = pkgs.mkShell { name = "zig-brotli"; nativeBuildInputs = [ # Uploads zig-out/docs to https://jeff.jcollie.page/zig-brotli/. pkgs.git-pages-cli pkgs.kcov pkgs.reuse # The reference implementation, which the test vectors in # tests/data are made with: tools/make_vectors.py drives its # Python binding, and the `brotli` command is there for # poking at a stream by hand. pkgs.brotli (pkgs.python3.withPackages (ps: [ ps.brotli ])) (zigFor system) ]; }; } ); };}