2023-10-25 14:00:01 +02:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pkg-config
|
|
|
|
, libusb1
|
|
|
|
, ncurses
|
|
|
|
, rtl-sdr
|
|
|
|
, hackrf
|
|
|
|
, limesuite
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "dump1090-afg";
|
|
|
|
version = "1.0";
|
|
|
|
|
|
|
|
src = ./.;
|
|
|
|
|
|
|
|
nativeBuildInputs = [ pkg-config ];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
libusb1
|
|
|
|
ncurses
|
|
|
|
rtl-sdr
|
|
|
|
hackrf
|
|
|
|
] ++ lib.optional stdenv.isLinux limesuite;
|
|
|
|
|
|
|
|
NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang
|
|
|
|
"-Wno-implicit-function-declaration -Wno-int-conversion";
|
|
|
|
|
2023-11-06 16:54:19 +01:00
|
|
|
buildFlags = [ "BLADERF=no" "dump1090" ];
|
2023-10-25 14:00:01 +02:00
|
|
|
|
|
|
|
doCheck = true;
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
|
|
|
|
mkdir -p $out/bin $out/share
|
|
|
|
cp -v dump1090 $out/bin/dump1090-afg
|
2023-11-11 16:48:39 +01:00
|
|
|
cp -vr public_html $out/share/dump1090-afg
|
2023-10-25 14:00:01 +02:00
|
|
|
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "A simple Mode S decoder for RTLSDR devices with patches for DL0XK";
|
|
|
|
homepage = "https://bierauflauf.unix-ag.uni-kl.de/AFG/dump1090";
|
|
|
|
license = licenses.gpl2Plus;
|
|
|
|
platforms = platforms.unix;
|
|
|
|
maintainers = with maintainers; [ earldouglas ];
|
|
|
|
};
|
|
|
|
}
|