Added flake.nix
This commit is contained in:
parent
096a1065ea
commit
c2ac98421b
3 changed files with 145 additions and 0 deletions
53
default.nix
Normal file
53
default.nix
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
, fetchFromGitHub
|
||||
, pkg-config
|
||||
, libbladeRF
|
||||
, libusb1
|
||||
, ncurses
|
||||
, rtl-sdr
|
||||
, hackrf
|
||||
, limesuite
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "dump1090-afg";
|
||||
version = "1.0";
|
||||
|
||||
src = ./.;
|
||||
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
|
||||
buildInputs = [
|
||||
libbladeRF
|
||||
libusb1
|
||||
ncurses
|
||||
rtl-sdr
|
||||
hackrf
|
||||
] ++ lib.optional stdenv.isLinux limesuite;
|
||||
|
||||
NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang
|
||||
"-Wno-implicit-function-declaration -Wno-int-conversion";
|
||||
|
||||
buildFlags = [ "dump1090" ];
|
||||
|
||||
doCheck = true;
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
mkdir -p $out/bin $out/share
|
||||
cp -v dump1090 $out/bin/dump1090-afg
|
||||
cp -vr public_html $out/share/dump1090
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "A simple Mode S decoder for RTLSDR devices with patches for DL0XK";
|
||||
homepage = "https://bierauflauf.unix-ag.uni-kl.de/AFG/dump1090";
|
||||
license = licenses.gpl2Plus;
|
||||
platforms = platforms.unix;
|
||||
maintainers = with maintainers; [ earldouglas ];
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue