Unverified Commit 2a6fee93 authored by Mario Rodas's avatar Mario Rodas Committed by GitHub
Browse files

Merge pull request #257921 from sarcasticadmin/rh/1695937800pat

pat: support libax25
parents 1b27a51b f72c9d48
Loading
Loading
Loading
Loading
+23 −2
Original line number Diff line number Diff line
{ 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 ];
    maintainers = with maintainers; [ dotemup sarcasticadmin ];
    platforms = platforms.unix;
  };
}