Something went wrong. Try again.
A port of FlightAware's dump1090, a Mode S and ADS-B decoder for software defined radios, to Zig 0.16.
Something went wrong. Try again.
zig-dump1090 flake.nix
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697# SPDX-FileCopyrightText: © 2025 Jeffrey C. Ollie# SPDX-License-Identifier: MIT
{ description = "zig-dump1090";
inputs = { nixpkgs = { url = "https://channels.nixos.org/nixpkgs-unstable/nixexprs.tar.xz"; }; zon2nix = { url = "github:jcollie/zon2nix"; inputs = { nixpkgs.follows = "nixpkgs"; }; }; };
outputs = { self, nixpkgs, zon2nix, ... }: let inherit (nixpkgs) lib; makePackages = system: import nixpkgs { inherit system; }; forAllSystems = lib.genAttrs lib.systems.flakeExposed; in { # An overlay so that `pkgs.zig-dump1090` resolves inside a NixOS # configuration, which is what the module's `package` option defaults to. overlays.default = final: _prev: { zig-dump1090 = final.callPackage ./package.nix { }; };
nixosModules.default = { imports = [ ./module.nix ]; nixpkgs.overlays = [ self.overlays.default ]; };
packages = forAllSystems ( system: let pkgs = makePackages system; in rec { zig-dump1090 = pkgs.callPackage ./package.nix { }; default = zig-dump1090; # Exposed on its own so that a workflow job can build something # other than the package -- the documentation, say -- without # building the package to get at the dependency set. zig-deps = pkgs.callPackage ./build.zig.zon.nix { }; } );
devShells = forAllSystems ( system: let pkgs = makePackages system; in { default = pkgs.mkShell { nativeBuildInputs = [ pkgs.git-pages-cli pkgs.pinact pkgs.reuse pkgs.zig_0_16
# Regenerate build.zig.zon.nix with: # nix develop -c zon2nix --16 --nix=build.zig.zon.nix build.zig.zon # # Wrapped so that the `zig env` it shells out to is this # project's Zig rather than whatever happens to be on PATH. # Without a Zig at all it writes nothing and leaves the previous # file looking untouched rather than obviously stale. (pkgs.symlinkJoin { name = "zon2nix"; paths = [ zon2nix.packages.${system}.zon2nix ]; nativeBuildInputs = [ pkgs.makeWrapper ]; postBuild = '' wrapProgram $out/bin/zon2nix \ --prefix PATH : ${lib.makeBinPath [ pkgs.zig_0_16 ]} ''; }) ]; }; } ); };}