2021-01-11 08:54:33 +01:00
|
|
|
{ lib, stdenv
|
2019-12-01 08:44:14 +01:00
|
|
|
, fetchFromGitHub
|
2021-01-17 03:09:27 +01:00
|
|
|
, pkg-config
|
2019-12-01 08:44:14 +01:00
|
|
|
, libbladeRF
|
2020-04-04 09:23:19 +02:00
|
|
|
, libusb1
|
2019-12-01 08:44:14 +01:00
|
|
|
, ncurses
|
|
|
|
, rtl-sdr
|
2021-10-28 10:01:22 +02:00
|
|
|
, hackrf
|
|
|
|
, limesuite
|
2019-12-01 08:44:14 +01:00
|
|
|
}:
|
2017-10-19 03:45:40 +02:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-02-18 17:22:49 +01:00
|
|
|
pname = "dump1090";
|
2022-02-11 11:32:20 +01:00
|
|
|
version = "7.1";
|
2017-10-19 03:45:40 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2019-12-01 08:44:14 +01:00
|
|
|
owner = "flightaware";
|
2019-02-18 17:22:49 +01:00
|
|
|
repo = pname;
|
2019-12-01 08:44:14 +01:00
|
|
|
rev = "v${version}";
|
2022-02-11 11:32:20 +01:00
|
|
|
sha256 = "sha256-1fD8ZMkTS/r+p1rrOfJhH2sz3sJCapQcvk8f8crGApw=";
|
2017-10-19 03:45:40 +02:00
|
|
|
};
|
|
|
|
|
2021-01-17 03:09:27 +01:00
|
|
|
nativeBuildInputs = [ pkg-config ];
|
2017-10-19 03:45:40 +02:00
|
|
|
|
2019-12-01 08:44:14 +01:00
|
|
|
buildInputs = [
|
|
|
|
libbladeRF
|
2020-04-04 09:23:19 +02:00
|
|
|
libusb1
|
2019-12-01 08:44:14 +01:00
|
|
|
ncurses
|
|
|
|
rtl-sdr
|
2021-10-28 10:01:22 +02:00
|
|
|
hackrf
|
|
|
|
] ++ lib.optional stdenv.isLinux limesuite;
|
|
|
|
|
|
|
|
NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang
|
|
|
|
"-Wno-implicit-function-declaration -Wno-int-conversion";
|
|
|
|
|
|
|
|
buildFlags = [ "dump1090" "view1090" ];
|
|
|
|
|
|
|
|
doCheck = true;
|
2017-10-19 03:45:40 +02:00
|
|
|
|
|
|
|
installPhase = ''
|
2021-05-02 01:10:45 +02:00
|
|
|
runHook preInstall
|
|
|
|
|
2017-10-19 03:45:40 +02:00
|
|
|
mkdir -p $out/bin $out/share
|
2017-12-31 21:57:44 +01:00
|
|
|
cp -v dump1090 view1090 $out/bin
|
2017-10-19 03:45:40 +02:00
|
|
|
cp -vr public_html $out/share/dump1090
|
2021-05-02 01:10:45 +02:00
|
|
|
|
|
|
|
runHook postInstall
|
2017-10-19 03:45:40 +02:00
|
|
|
'';
|
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2017-10-19 03:45:40 +02:00
|
|
|
description = "A simple Mode S decoder for RTLSDR devices";
|
2019-12-01 08:44:14 +01:00
|
|
|
homepage = "https://github.com/flightaware/dump1090";
|
|
|
|
license = licenses.gpl2Plus;
|
2021-10-28 10:01:22 +02:00
|
|
|
platforms = platforms.unix;
|
2017-10-19 03:45:40 +02:00
|
|
|
maintainers = with maintainers; [ earldouglas ];
|
|
|
|
};
|
|
|
|
}
|