From 4be0eae955e545485fd59142e5ad3fc850341c49 Mon Sep 17 00:00:00 2001 From: Robert James Hernandez Date: Thu, 28 Sep 2023 22:25:27 +0000 Subject: [PATCH 1/2] pat: support libax25 --- pkgs/applications/radio/pat/default.nix | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/radio/pat/default.nix b/pkgs/applications/radio/pat/default.nix index 58eefd0dbcd0..96211d33e691 100644 --- a/pkgs/applications/radio/pat/default.nix +++ b/pkgs/applications/radio/pat/default.nix @@ -1,4 +1,10 @@ -{ lib, stdenv, buildGoModule, fetchFromGitHub }: +{ lib +, stdenv +, buildGoModule +, fetchFromGitHub +, libax25 +, installShellFiles +}: buildGoModule rec { pname = "pat"; @@ -15,10 +21,25 @@ buildGoModule rec { ldflags = [ "-s" "-w" ]; + nativeBuildInputs = [ + installShellFiles + ]; + + buildInputs = lib.optional stdenv.isLinux [ libax25 ]; + + # Needed by wl2k-go go module for libax25 to include support for Linux' AX.25 stack by linking against libax25. + # ref: https://github.com/la5nta/wl2k-go/blob/abe3ae5bf6a2eec670a21672d461d1c3e1d4c2f3/transport/ax25/ax25.go#L11-L17 + tags = lib.optionals stdenv.isLinux [ "libax25" ]; + + postInstall = '' + installManPage man/pat-configure.1 man/pat.1 + ''; + meta = with lib; { description = "Pat is a cross platform Winlink client written in Go."; homepage = "https://getpat.io/"; license = licenses.mit; maintainers = with maintainers; [ dotemup ]; + platforms = platforms.unix; }; } From f72c9d488b76ce2d0b62dcd9c14e96eddcf5d332 Mon Sep 17 00:00:00 2001 From: Robert James Hernandez Date: Thu, 28 Sep 2023 22:25:47 +0000 Subject: [PATCH 2/2] pat: add maintainer sarcasticadmin --- pkgs/applications/radio/pat/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/applications/radio/pat/default.nix b/pkgs/applications/radio/pat/default.nix index 96211d33e691..991df60b24bc 100644 --- a/pkgs/applications/radio/pat/default.nix +++ b/pkgs/applications/radio/pat/default.nix @@ -39,7 +39,7 @@ buildGoModule rec { description = "Pat is a cross platform Winlink client written in Go."; homepage = "https://getpat.io/"; license = licenses.mit; - maintainers = with maintainers; [ dotemup ]; + maintainers = with maintainers; [ dotemup sarcasticadmin ]; platforms = platforms.unix; }; }