An SMTP client and server library for Zig implementing RFC 5321.
1# SPDX-FileCopyrightText: © 2026 Jeffrey C. Ollie <jeff@ocjtech.us>
2# SPDX-License-Identifier: MIT
3
4# The project-local Zig package directory (zig-pkg/) as a derivation, so
5# builds can run without Zig fetching anything over the network. Only the
6# files listed in each dependency's `paths` may be present, since Zig
7# hashes the package contents against the directory name.
8
9{
10 runCommand,
11 fetchzip,
12}:
13let
14 # Must match the url/hash pinned in build.zig.zon.
15 tlsDep = fetchzip {
16 name = "tls.zig-src";
17 url = "https://github.com/ianic/tls.zig/archive/e04ae448ce7ee70c136d4d48b059314543203809.tar.gz";
18 hash = "sha256-afPTfauIV49IATX0szuOdKLloyqI4XKsyNk8KkasAvg=";
19 };
20 tlsDepId = "tls-0.1.0-ER2e0jGpBgCkVC-Yp12NgSdHNUtZr52MleJ8roHlUa54";
21in
22runCommand "zsmtp-zig-pkg" { } ''
23 mkdir -p $out/${tlsDepId}
24 cp -r ${tlsDep}/{build.zig,build.zig.zon,readme.md,src} $out/${tlsDepId}/
25''