# SPDX-FileCopyrightText: © 2026 Jeffrey C. Ollie # SPDX-License-Identifier: GPL-2.0-or-later { lib, stdenv, callPackage, zig_0_16, }: let # Generated from build.zig.zon by zon2nix; regenerate with # nix develop -c zon2nix --16 --nix=build.zig.zon.nix build.zig.zon zigDeps = callPackage ./build.zig.zon.nix { }; in stdenv.mkDerivation (finalAttrs: { pname = "zig-dump1090"; version = "0.1.0-dev"; src = lib.fileset.toSource { root = ./.; fileset = lib.fileset.unions [ ./build.zig ./build.zig.zon ./src ./tools ./LICENSES ./REUSE.toml ./README.md ]; }; nativeBuildInputs = [ zig_0_16 ]; # --system does not merely offer the directory, it forbids fetching: a # dependency missing from it is an error naming the package rather than a # silent reach for 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; doCheck = true; meta = { description = "Mode S and ADS-B receiver, a port of FlightAware's dump1090 to Zig"; homepage = "https://git.jcollie.dev/jeff/zig-dump1090"; license = lib.licenses.gpl2Plus; mainProgram = "dump1090"; maintainers = [ ]; # The RTL-SDR input talks to usbfs directly, and the service is only # meaningful where there is a radio to open. platforms = lib.platforms.linux; }; })