Something went wrong. Try again.
Classic Unix mailbox files for Zig 0.16: an iterator to read, a predicate to delete, an atomic rewrite for every change.
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263# SPDX-FileCopyrightText: © 2026 Jeffrey C. Ollie <jeff@ocjtech.us># SPDX-License-Identifier: MIT
{ lib, stdenv, callPackage, zig_0_17,}:let # Generated from build.zig.zon by zon2nix; regenerate with # nix develop -c zon2nix --17 --nix=build.zig.zon.nix build.zig.zon zigDeps = callPackage ./build.zig.zon.nix { };instdenv.mkDerivation (finalAttrs: { pname = "zig-mbox"; version = "0.2.0";
# Named rather than filtered, so that editing something outside this list -- # the flake, a scratch file, the NixOS tests that consume the result -- does # not rebuild the package and, in the tests, the whole virtual machine. src = lib.fileset.toSource { root = ./.; fileset = lib.fileset.unions [ ./build.zig ./build.zig.zon ./build.zig.zon.nix ./src ./tests ./tools ./LICENSES ./README.md ./REUSE.toml ]; };
nativeBuildInputs = [ zig_0_17 ];
# `--system` does not merely offer the directory, it forbids fetching: a # dependency missing from it is a build error naming the package rather than # a silent attempt to reach a network the sandbox does not have. zigBuildFlags = [ "--system" "${zigDeps}" ]; # The check phase assembles its own flags rather than reusing the build's, # so without this `zig build test` runs without --system and tries to fetch. zigCheckFlags = finalAttrs.zigBuildFlags;
# The end-to-end tests want a directory to make a mailbox in and a file to # lock, both of which the build sandbox has; nothing here needs a network # or a second process. doCheck = true;
meta = { description = "A classic Unix mailbox (mbox) library for Zig"; homepage = "https://git.jcollie.dev/jeff/zig-mbox"; license = lib.licenses.mit; mainProgram = "zig-mbox"; platforms = lib.platforms.unix; };})