From 7c0a50390e45978af693dbcb4a917a9c73b6c0a1 Mon Sep 17 00:00:00 2001 From: PapayaJackal <145766029+PapayaJackal@users.noreply.github.com> Date: Sun, 20 Oct 2024 12:08:17 +0000 Subject: [PATCH] trunk-recorder: init at 5.0.1 --- pkgs/by-name/tr/trunk-recorder/package.nix | 72 ++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 pkgs/by-name/tr/trunk-recorder/package.nix diff --git a/pkgs/by-name/tr/trunk-recorder/package.nix b/pkgs/by-name/tr/trunk-recorder/package.nix new file mode 100644 index 000000000000..59852e783c7e --- /dev/null +++ b/pkgs/by-name/tr/trunk-recorder/package.nix @@ -0,0 +1,72 @@ +{ + lib, + stdenv, + fetchFromGitHub, + cmake, + git, + makeWrapper, + pkg-config, + boost, + curl, + gmp, + gnuradio, + gnuradioPackages, + hackrf, + mpir, + openssl, + spdlog, + uhd, + volk, + fdk-aac-encoder, + sox, + hackrfSupport ? true, +}: +stdenv.mkDerivation rec { + pname = "trunk-recorder"; + version = "5.0.1"; + + src = fetchFromGitHub { + owner = "robotastic"; + repo = "trunk-recorder"; + rev = "v${version}"; + hash = "sha256-d2iBCSLR3kr6rnLXO3MeGVdi6+8pqXZqW/yhxAvA1cY="; + }; + + cmakeFlags = [ "-DCMAKE_SKIP_BUILD_RPATH=ON" ]; + + nativeBuildInputs = [ + cmake + git + pkg-config + makeWrapper + ]; + buildInputs = [ + boost + curl + gmp + gnuradio + gnuradioPackages.osmosdr + openssl + spdlog + uhd + volk + ] ++ lib.optionals hackrfSupport [ hackrf ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ mpir ]; + + postFixup = '' + wrapProgram $out/bin/trunk-recorder --prefix PATH : ${ + lib.makeBinPath [ + sox + fdk-aac-encoder + ] + } + ''; + + meta = { + description = "Record calls from trunked radio systems"; + homepage = "https://trunkrecorder.com/"; + changelog = "https://github.com/robotastic/trunk-recorder/releases/tag/v${version}"; + license = lib.licenses.gpl3; + maintainers = with lib.maintainers; [ PapayaJackal ]; + mainProgram = "trunk-recorder"; + }; +}