Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
76 lines
1.7 KiB
Nix
76 lines
1.7 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
fetchFromGitHub,
|
|
pkg-config,
|
|
ncurses,
|
|
rtl-sdr,
|
|
zlib,
|
|
zstd,
|
|
}:
|
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
|
pname = "readsb";
|
|
version = "3.16.3";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "wiedehopf";
|
|
repo = "readsb";
|
|
tag = "v${finalAttrs.version}";
|
|
hash = "sha256-IjARj2qC1/kwoVvc5SXkJmoDN2m1fjPWj7jVgHG8cWI=";
|
|
};
|
|
|
|
strictDeps = true;
|
|
|
|
nativeBuildInputs = [ pkg-config ];
|
|
|
|
buildInputs = [
|
|
ncurses
|
|
rtl-sdr
|
|
zlib
|
|
zstd
|
|
];
|
|
|
|
# remove version string magic that utilizes git and current time
|
|
postPatch = ''
|
|
sed --in-place '/^READSB_VERSION :=/d' Makefile
|
|
'';
|
|
|
|
enableParallelBuilding = true;
|
|
makeFlags = [
|
|
# set something for version, we removed the original value in postPatch
|
|
"READSB_VERSION=${finalAttrs.version}"
|
|
]
|
|
++ (lib.lists.optional (rtl-sdr != null) "RTLSDR=yes");
|
|
|
|
doCheck = true;
|
|
checkTarget = "cprtest";
|
|
# TODO there is a crctests target in Make, it describes how to compile ./crctests, but doesn't run
|
|
# it. Compilation also fails with:
|
|
#
|
|
# ld: /build/cc9NI2Fd.o: in function `malloc_or_exit':
|
|
# > /build/source/readsb.h:407:(.text+0xbad): undefined reference to `setExit'
|
|
#
|
|
# Comment this test in once this has been fixed upstream.
|
|
# postCheck = ''
|
|
# make crctests && ./crctests
|
|
# '';
|
|
|
|
installPhase = ''
|
|
runHook preInstall
|
|
|
|
mkdir --parent -- $out/bin
|
|
mv readsb viewadsb $out/bin
|
|
|
|
runHook postInstall
|
|
'';
|
|
|
|
meta = {
|
|
description = "ADS-B decoder swiss knife";
|
|
homepage = "https://github.com/wiedehopf/readsb";
|
|
license = with lib.licenses; [ gpl3Plus ];
|
|
maintainers = with lib.maintainers; [ wucke13 ];
|
|
platforms = lib.platforms.linux; # uses epoll, hence its linux only
|
|
};
|
|
})
|