Something went wrong. Try again.
DMARC (RFC 7489) for Zig: the record grammar, identifier alignment, and policy discovery by DNS tree walk rather than a public suffix list.
Something went wrong. Try again.
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465# SPDX-FileCopyrightText: © 2026 Jeffrey C. Ollie <jeff@ocjtech.us># SPDX-License-Identifier: MIT
{ lib, stdenv, callPackage, zig_0_16,}:let # Generated by zon2nix from build.zig.zon; regenerate with: # nix develop -c zon2nix --16 --nix=build.zig.zon.nix build.zig.zon zigDeps = callPackage ./build.zig.zon.nix { };instdenv.mkDerivation (finalAttrs: { pname = "zig-dmarc"; # Keep in step with `.version` in build.zig.zon. version = "0.1.0";
# Only what `zig build` actually reads. Narrowing the source this way # keeps a stray .zig-cache out of the store, and means edits to the # flake, the README or the license texts do not invalidate the # derivation. src = lib.fileset.toSource { root = ./.; fileset = lib.fileset.unions [ ./build.zig ./build.zig.zon ./src ./tools ]; };
nativeBuildInputs = [ zig_0_16 ];
# All Zig dependencies come from nix, so the sandboxed build never # fetches over the network. 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, # tries to fetch, and fails in the sandbox. zigCheckFlags = finalAttrs.zigBuildFlags;
# The tests are hermetic: parsers over bytes, and an evaluator that # reads a table rather than a nameserver. doCheck = true;
meta = { description = "DMARC (RFC 7489) for Zig"; longDescription = '' zig-dmarc implements RFC 7489: the record grammar, identifier alignment against SPF and DKIM results, and policy discovery. It consumes authentication results rather than producing them, and takes its DNS resolver as a parameter. ''; homepage = "https://git.jcollie.dev/jeff/zig-dmarc"; license = lib.licenses.mit; mainProgram = "dmarc"; platforms = lib.platforms.unix; };})