Something went wrong. Try again.
Zig bindings to Google's WUFFS image decoders for PNG, JPEG, GIF and Netpbm
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687# SPDX-FileCopyrightText: © 2024-2026 Jeffrey C. Ollie <jeff@ocjtech.us># SPDX-License-Identifier: MIT
{ description = "zig-wuffs";
inputs = { nixpkgs = { url = "https://channels.nixos.org/nixpkgs-unstable/nixexprs.tar.xz"; }; zon2nix = { url = "github:jcollie/zon2nix"; inputs = { nixpkgs.follows = "nixpkgs"; }; }; };
outputs = { nixpkgs, zon2nix, ... }: let inherit (nixpkgs) lib; makePackages = system: import nixpkgs { inherit system; }; forAllSystems = lib.genAttrs lib.systems.flakeExposed; in { packages = forAllSystems ( system: let pkgs = makePackages system; in rec { zig-wuffs = pkgs.callPackage ./package.nix { }; default = zig-wuffs;
# The dependency set on its own, so that a job wanting to run # `zig build` for something other than the package -- the tests, # say -- can hand the path straight to Zig without building the # package to get at it. zig-deps = pkgs.callPackage ./build.zig.zon.nix { }; } );
devShells = forAllSystems ( system: let pkgs = makePackages system; in { default = pkgs.mkShell { nativeBuildInputs = [ pkgs.git-pages-cli pkgs.pinact pkgs.reuse pkgs.zig_0_17 ] # zon2nix shells out to `zig env` to read the manifest, and # without a Zig on PATH it prints "unable to execute zig" and # exits without writing anything -- which looks exactly like a # regeneration that found no changes. Wrapping it with this # flake's Zig means the one it finds is the one the project # builds with, rather than whatever the caller happens to have. ++ lib.optionals (zon2nix.packages ? ${system}) [ (pkgs.symlinkJoin { name = "zon2nix"; paths = [ zon2nix.packages.${system}.zon2nix ]; nativeBuildInputs = [ pkgs.makeWrapper ]; postBuild = '' wrapProgram $out/bin/zon2nix \ --prefix PATH : ${lib.makeBinPath [ pkgs.zig_0_17 ]} ''; }) ]; }; } ); };}