{ lib , fetchFromGitHub , stdenv , libusb1 , ncurses , zlib , zstd , librtlsdr , libbladeRF , libiio , libad9361 , pkg-config }: stdenv.mkDerivation rec { pname = "readsb"; version = "3.14.1595"; src = fetchFromGitHub { owner = "wiedehopf"; repo = "readsb"; rev = "v${version}"; sha256 = "sha256:1ws8fphlgghcp8v1p88gjpwmy3sf0sypdwzcaai19a882jll486n"; }; buildInputs = [ libusb1 ncurses zlib zstd librtlsdr libbladeRF libiio libad9361 ]; nativeBuildInputs = [ pkg-config ]; hardeningDisable = [ "fortify" ]; # the application does this anyway makeFlags = "RTLSDR=yes AIRCRAFT_HASH_BITS=15 HISTORY=yes BLADERF=yes PLUTOSDR=yes AGGRESSIVE=yes HAVE_BIASTEE=yes"; enableParallelBuilding = true; installPhase = '' runHook preInstall install -d $out/bin install -m 0755 readsb $out/bin/readsb ln -s $out/bin/readsb $out/bin/viewadsb runHook postInstall ''; }