# SPDX-FileCopyrightText: © 2026 Jeffrey C. Ollie # SPDX-License-Identifier: MIT { lib, stdenv, zig_0_17, }: stdenv.mkDerivation { pname = "zig-ftp"; 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 ./src ./tests ./tools ./LICENSES ./README.md ./REUSE.toml ]; }; # The setup hook ships inside the compiler package; it supplies the build, # check and install phases and builds ReleaseSafe for a baseline CPU. nativeBuildInputs = [ zig_0_17 ]; # `zig build test` here rather than only in CI: the unit tests are pure, and # the end-to-end ones only need a loopback socket, which the build sandbox # has. doCheck = true; meta = { description = "An FTP client and server library for Zig"; homepage = "https://git.jcollie.dev/jeff/zig-ftp"; license = lib.licenses.mit; mainProgram = "zig-ftp"; platforms = lib.platforms.unix; }; }