2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv
|
2020-04-24 23:36:52 +00:00
|
|
|
, fetchFromGitHub
|
2021-02-05 17:12:51 +00:00
|
|
|
, pkg-config
|
2020-04-24 23:36:52 +00:00
|
|
|
, libbladeRF
|
|
|
|
, libusb1
|
|
|
|
, ncurses
|
|
|
|
, rtl-sdr
|
2021-12-06 16:07:01 +00:00
|
|
|
, hackrf
|
|
|
|
, limesuite
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "dump1090";
|
2022-12-28 21:21:41 +00:00
|
|
|
version = "8.2";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "flightaware";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2022-12-28 21:21:41 +00:00
|
|
|
sha256 = "sha256-SUvK9XTXIDimEMEnORnp/Af/F030TZTxLI43Jzz31Js=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
nativeBuildInputs = [ pkg-config ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
libbladeRF
|
|
|
|
libusb1
|
|
|
|
ncurses
|
|
|
|
rtl-sdr
|
2021-12-06 16:07:01 +00:00
|
|
|
hackrf
|
|
|
|
] ++ lib.optional stdenv.isLinux limesuite;
|
|
|
|
|
2023-03-04 12:14:45 +00:00
|
|
|
env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang
|
2021-12-06 16:07:01 +00:00
|
|
|
"-Wno-implicit-function-declaration -Wno-int-conversion";
|
|
|
|
|
|
|
|
buildFlags = [ "dump1090" "view1090" ];
|
|
|
|
|
|
|
|
doCheck = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
installPhase = ''
|
2021-05-04 21:07:42 +00:00
|
|
|
runHook preInstall
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
mkdir -p $out/bin $out/share
|
|
|
|
cp -v dump1090 view1090 $out/bin
|
|
|
|
cp -vr public_html $out/share/dump1090
|
2021-05-04 21:07:42 +00:00
|
|
|
|
|
|
|
runHook postInstall
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "A simple Mode S decoder for RTLSDR devices";
|
|
|
|
homepage = "https://github.com/flightaware/dump1090";
|
|
|
|
license = licenses.gpl2Plus;
|
2021-12-06 16:07:01 +00:00
|
|
|
platforms = platforms.unix;
|
2020-04-24 23:36:52 +00:00
|
|
|
maintainers = with maintainers; [ earldouglas ];
|
|
|
|
};
|
|
|
|
}
|