nur-packages

My NUR packages
git clone git://git.sikmir.ru/nur-packages
Log | Files | Refs | README | LICENSE

commit 6cf813571fbe59a69d8472ab7fa64fc8d95c90fb
parent 457b4dd8d4066c1cf26d963fd16695178a56f0ea
Author: Nikolay Korotkiy <sikmir@gmail.com>
Date:   Mon,  4 Oct 2021 01:49:18 +0300

Add aprsc

Diffstat:
Mpkgs/default.nix | 1+
Apkgs/radio/aprsc/default.nix | 46++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 47 insertions(+), 0 deletions(-)

diff --git a/pkgs/default.nix b/pkgs/default.nix @@ -311,6 +311,7 @@ lib.makeScope newScope ( ### RADIO airspyhf = callPackage ./radio/airspyhf { }; + aprsc = callPackage ./radio/aprsc { }; libad9361 = callPackage ./radio/libad9361 { }; linrad = callPackage ./radio/linrad { }; sdrpp = callPackage ./radio/sdrpp { }; diff --git a/pkgs/radio/aprsc/default.nix b/pkgs/radio/aprsc/default.nix @@ -0,0 +1,46 @@ +{ lib, stdenv, fetchFromGitHub, fetchpatch, perl, libevent, openssl }: + +stdenv.mkDerivation rec { + pname = "aprsc"; + version = "2.1.10"; + + src = fetchFromGitHub { + owner = "hessu"; + repo = pname; + rev = "release/${version}"; + hash = "sha256-47adSt3NBFr7UtZfoB44iNhM2EtiMk0mMeXHWgvi1UI="; + }; + + patches = (fetchpatch { + url = "https://raw.githubusercontent.com/freebsd/freebsd-ports/54cc4cc6eaed14e3d495ca3a3b6f86f3f429b991/net/aprsc/files/patch-Makefile.in"; + sha256 = "sha256-lxnE/9fgnxZxIcb9bNcq4PoOIBntIdyVYJa5rPIx26s="; + }); + + patchFlags = [ "-p0" ]; + + postPatch = '' + substituteInPlace Makefile.in \ + --replace "(DESTDIR)\$(MANDIR)" "(DESTDIR)\$(PREFIX)\$(MANDIR)" \ + --replace "SRCVERSION:=\$(GITVERSION)" "SRCVERSION:=gd72a17c" + ''; + + sourceRoot = "${src.name}/src"; + + nativeBuildInputs = [ perl ]; + + buildInputs = [ libevent openssl ]; + + preConfigure = "LD=$CC"; + configureFlags = [ "--sbindir=/bin" "--with-openssl" ]; + + installFlags = [ "PREFIX=$(out)" ]; + + meta = with lib; { + description = "A core APRS-IS server"; + homepage = "http://he.fi/aprsc/"; + license = licenses.bsd3; + maintainers = [ maintainers.sikmir ]; + platforms = platforms.linux; + skip.ci = stdenv.isDarwin; + }; +}