nixpkgs/pkgs/by-name/pa/pat/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

47 lines
1.2 KiB
Nix
Raw Normal View History

2023-09-28 22:25:27 +00:00
{ lib
, stdenv
, buildGoModule
, fetchFromGitHub
, libax25
, installShellFiles
}:
2023-07-16 19:53:47 +00:00
buildGoModule rec {
pname = "pat";
2023-12-04 01:15:29 +00:00
version = "0.15.1";
2023-07-16 19:53:47 +00:00
src = fetchFromGitHub {
owner = "la5nta";
repo = "pat";
rev = "v${version}";
2023-12-04 01:15:29 +00:00
hash = "sha256-wNWqqGc4mf3z0ejMpU+jWhqCbjNJ2b6+pbBjDYKwKK8=";
2023-07-16 19:53:47 +00:00
};
2023-12-04 01:15:29 +00:00
vendorHash = "sha256-m5yb6+TfRApw0ZROx9ZA3RPiKV+1DHo/73CNQpIfMlU=";
2023-07-16 19:53:47 +00:00
ldflags = [ "-s" "-w" ];
2023-09-28 22:25:27 +00:00
nativeBuildInputs = [
installShellFiles
];
buildInputs = lib.optional stdenv.hostPlatform.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.hostPlatform.isLinux [ "libax25" ];
postInstall = ''
installManPage man/pat-configure.1 man/pat.1
'';
2023-07-16 19:53:47 +00:00
meta = with lib; {
description = "Pat is a cross platform Winlink client written in Go";
homepage = "https://getpat.io/";
license = licenses.mit;
2023-09-28 22:25:47 +00:00
maintainers = with maintainers; [ dotemup sarcasticadmin ];
2023-09-28 22:25:27 +00:00
platforms = platforms.unix;
2024-02-11 02:19:15 +00:00
mainProgram = "pat";
2023-07-16 19:53:47 +00:00
};
}