Something went wrong. Try again.
QUIC for Zig 0.17: RFC 9000-9002 with TLS 1.3, as a sans-I/O core plus a socket layer, with datagrams, multipath and raw public keys.
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475# SPDX-FileCopyrightText: © 2026 Jeffrey C. Ollie <jeff@ocjtech.us># SPDX-License-Identifier: MIT
{ lib, stdenv, callPackage, zig,}:let # Generated from build.zig.zon by zon2nix; regenerate with # nix develop -c zon2nix --17 --nix=build.zig.zon.nix build.zig.zon # nixpkgs has no Zig 0.17, so the expression is handed the one this builds # with rather than finding it by name. zigDeps = callPackage ./build.zig.zon.nix { zig_0_17 = zig; };instdenv.mkDerivation (finalAttrs: { pname = "zig-quic"; version = "0.3.0";
src = lib.fileset.toSource { root = ./.; fileset = lib.fileset.unions [ ./build.zig ./build.zig.zon ./src # The NixOS tests are left out on purpose: they import this derivation, # so including them would make editing a test rebuild the thing it # tests, and every virtual machine with it. (lib.fileset.difference ./tests ./tests/nixos) ./tools ./LICENSES ./README.md ./REUSE.toml ]; };
# The setup hook ships inside the compiler package; it supplies the build # and check phases and builds ReleaseSafe for a baseline CPU. nativeBuildInputs = [ zig ];
# `--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}" ]; zigCheckFlags = finalAttrs.zigBuildFlags;
# What this installs is a `doq` binary and the API documentation. The binary # is what the interoperability test points at another implementation's # server -- a library that has only ever been run against itself has only # ever been shown to agree with itself -- and the documentation is what the # workflow publishes, and what fails if a doc comment stops compiling. dontUseZigInstall = true; installPhase = '' runHook preInstall zig build install --system ${zigDeps} -Dcpu=baseline --release=safe --prefix "$out" zig build docs --system ${zigDeps} -Dcpu=baseline --release=safe mkdir -p "$out/share" cp -r zig-out/docs "$out/share/docs" runHook postInstall '';
doCheck = true;
meta = { description = "QUIC (RFC 9000, 9001, 9002) for Zig"; homepage = "https://git.jcollie.dev/jeff/zig-quic"; license = lib.licenses.mit; platforms = lib.platforms.unix; };})