nix-config/overlay/readsb.nix

34 lines
579 B
Nix

{ stdenv, fetchFromGitHub
, pkg-config, protobufc
, ncurses, libusb1, zlib
, librtlsdr
}:
stdenv.mkDerivation rec {
name = "readsb";
src = fetchFromGitHub {
owner = "wiedehopf";
repo = name;
rev = "dev";
sha256 = "19y3mf8s6zrkj4ar6wnlaxw7cy3cj46h9r0mcr30d5f0i48y24j8";
};
nativeBuildInputs = [
pkg-config
];
buildInputs = [
ncurses zlib libusb1
librtlsdr
];
enableParallelBuilding = true;
makeFlags = [
"RTLSDR=yes"
];
installPhase = ''
find . -type f
mkdir -p $out/bin
cp -a readsb viewadsb $out/bin/
'';
}