about summary refs log tree commit diff
path: root/pkgs/by-name/ap/aprx/package.nix
blob: fe946ff48366c3bcfdb256dbc2bed0b39aca0f61 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
{ lib
, stdenv
, fetchFromGitHub
, perl
}:

stdenv.mkDerivation {
  pname = "aprx";
  version = "2.9.1-unstable-2021-09-21";

  src = fetchFromGitHub {
    owner = "PhirePhly";
    repo = "aprx";
    rev = "2c84448fe6d897980234961a87ee4c1d4fad69ec";
    sha256 = "sha256-01PB7FaG8GmPm1U15/3g1CfQwdYmf3ThZFdVh2zUAl4=";
  };

  nativeBuildInputs = [ perl ];

  env.NIX_CFLAGS_COMPILE = toString ([
    "-fcommon"
    "-O2"
  ] ++ lib.optional stdenv.cc.isClang "-Wno-error=implicit-int");

  configureFlags = [
    "--with-erlangstorage"
    "--sbindir=$(out)/bin"
    "--sysconfdir=$(out)/etc"
    "--mandir=$(out)/share/man"
  ];

  makeFlags = [ "INSTALL=install" ];

  preInstall = ''
    mkdir -p $out/bin $out/share/man/man8 $out/etc
  '';

  meta = with lib; {
    description = "Multitalented APRS i-gate / digipeater";
    homepage = "http://thelifeofkenneth.com/aprx";
    license = licenses.bsd3;
    maintainers = with maintainers; [ sarcasticadmin ];
    mainProgram = "aprx";
    platforms = platforms.unix;
  };
}