2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv
|
2019-12-01 07:44:14 +00:00
|
|
|
, fetchFromGitHub
|
2021-01-17 02:09:27 +00:00
|
|
|
, pkg-config
|
2019-12-01 07:44:14 +00:00
|
|
|
, libbladeRF
|
2020-04-04 07:23:19 +00:00
|
|
|
, libusb1
|
2019-12-01 07:44:14 +00:00
|
|
|
, ncurses
|
|
|
|
, rtl-sdr
|
|
|
|
}:
|
2017-10-19 01:45:40 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-02-18 16:22:49 +00:00
|
|
|
pname = "dump1090";
|
2021-05-01 21:58:36 +00:00
|
|
|
version = "5.0";
|
2017-10-19 01:45:40 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2019-12-01 07:44:14 +00:00
|
|
|
owner = "flightaware";
|
2019-02-18 16:22:49 +00:00
|
|
|
repo = pname;
|
2019-12-01 07:44:14 +00:00
|
|
|
rev = "v${version}";
|
2021-05-01 21:58:36 +00:00
|
|
|
sha256 = "1fckfcgypmplzl1lidd04jxiabczlfx9mv21d6rbsfknghsjpn03";
|
2017-10-19 01:45:40 +00:00
|
|
|
};
|
|
|
|
|
2021-01-17 02:09:27 +00:00
|
|
|
nativeBuildInputs = [ pkg-config ];
|
2017-10-19 01:45:40 +00:00
|
|
|
|
2019-12-01 07:44:14 +00:00
|
|
|
buildInputs = [
|
|
|
|
libbladeRF
|
2020-04-04 07:23:19 +00:00
|
|
|
libusb1
|
2019-12-01 07:44:14 +00:00
|
|
|
ncurses
|
|
|
|
rtl-sdr
|
|
|
|
];
|
2017-10-19 01:45:40 +00:00
|
|
|
|
|
|
|
installPhase = ''
|
2021-05-01 23:10:45 +00:00
|
|
|
runHook preInstall
|
|
|
|
|
2017-10-19 01:45:40 +00:00
|
|
|
mkdir -p $out/bin $out/share
|
2017-12-31 20:57:44 +00:00
|
|
|
cp -v dump1090 view1090 $out/bin
|
2017-10-19 01:45:40 +00:00
|
|
|
cp -vr public_html $out/share/dump1090
|
2021-05-01 23:10:45 +00:00
|
|
|
|
|
|
|
runHook postInstall
|
2017-10-19 01:45:40 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2017-10-19 01:45:40 +00:00
|
|
|
description = "A simple Mode S decoder for RTLSDR devices";
|
2019-12-01 07:44:14 +00:00
|
|
|
homepage = "https://github.com/flightaware/dump1090";
|
|
|
|
license = licenses.gpl2Plus;
|
2017-10-19 01:45:40 +00:00
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with maintainers; [ earldouglas ];
|
|
|
|
};
|
|
|
|
}
|