2022-12-20 15:11:06 +00:00
|
|
|
{ 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
|
|
|
|
];
|
2023-07-19 02:54:30 +00:00
|
|
|
hardeningDisable = [ "fortify" ]; # the application does this anyway
|
2022-12-20 15:11:06 +00:00
|
|
|
|
|
|
|
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
|
|
|
|
'';
|
|
|
|
}
|