depot/third_party/nixpkgs/pkgs/applications/radio/dump1090/default.nix
Default email bcb2f287e1 Project import generated by Copybara.
GitOrigin-RevId: d603719ec6e294f034936c0d0dc06f689d91b6c3
2024-06-20 20:27:18 +05:30

57 lines
1.2 KiB
Nix

{ lib, stdenv
, fetchFromGitHub
, pkg-config
, libbladeRF
, libusb1
, ncurses
, rtl-sdr
, hackrf
, limesuite
}:
stdenv.mkDerivation rec {
pname = "dump1090";
version = "9.0";
src = fetchFromGitHub {
owner = "flightaware";
repo = pname;
rev = "v${version}";
sha256 = "sha256-rc4mg+Px+0p2r38wxIah/rHqWjHSU0+KCPgqj/Gl3oo=";
};
nativeBuildInputs = [ pkg-config ];
buildInputs = [
libbladeRF
libusb1
ncurses
rtl-sdr
hackrf
] ++ lib.optional stdenv.isLinux limesuite;
env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang
"-Wno-implicit-function-declaration -Wno-int-conversion -Wno-unknown-warning-option";
buildFlags = [ "DUMP1090_VERSION=${version}" "dump1090" "view1090" ];
doCheck = true;
installPhase = ''
runHook preInstall
mkdir -p $out/bin $out/share
cp -v dump1090 view1090 $out/bin
cp -vr public_html $out/share/dump1090
runHook postInstall
'';
meta = with lib; {
description = "Simple Mode S decoder for RTLSDR devices";
homepage = "https://github.com/flightaware/dump1090";
license = licenses.gpl2Plus;
platforms = platforms.unix;
maintainers = with maintainers; [ earldouglas ];
};
}