nixos-piaware/packages/dump978-fa.nix
2023-12-13 23:32:42 -06:00

53 lines
1.2 KiB
Nix

{ pkgs, ... }:
let
pname = "dump978-fa";
version = "8.2";
in
pkgs.stdenv.mkDerivation {
inherit pname version;
src = pkgs.fetchFromGitHub {
owner = "flightaware";
repo = "dump978";
rev = "v${version}";
hash = "sha256-6LPshYbI/lLcjR/xP7DHFza2xVcfiAzh66Y7w95YDjk=";
};
outputs = [ "out" "html" ];
nativeBuildInputs = [
# pkgs.autoPatchelfHook
pkgs.pkg-config
];
propagatedBuildInputs = [
pkgs.boost
pkgs.soapysdr
];
buildFlags = [
"VERSION=v${version}"
"dump978-fa"
"faup978"
"skyaware978"
];
installPhase = ''
runHook preInstall
mkdir -p $out/bin
install -D dump978-fa $out/bin
install -D faup978 $out/bin
install -D skyaware978 $out/bin
mkdir -p $html
cp -a skyaware/* $html
runHook postInstall
'';
meta = with pkgs.lib; {
homepage = "https://github.com/flightaware/dump978";
description = "The FlightAware 978MHz UAT decoder..";
longDescription = ''
This is the FlightAware 978MHz UAT decoder.
It is a reimplementation in C++, loosely based on the demodulator from https://github.com/mutability/dump978.
'';
license = licenses.bsd2;
};
}