summaryrefslogtreecommitdiffstats
path: root/pkgs/by-name/li/libax25/package.nix
blob: c15baf5404969b1513d79bb013e42765a1dd3c2f (plain)
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,
  autoreconfHook,
  glibc,
}:

stdenv.mkDerivation (finalAttrs: {
  pname = "libax25";
  version = "0.0.12-rc5";

  strictDeps = true;

  nativeBuildInputs = [
    autoreconfHook
    glibc
  ]
  ++ lib.optionals stdenv.hostPlatform.isStatic [ glibc.static ];

  # src from linux-ax25.in-berlin.de remote has been
  # unreliable, pointing to github mirror from the radiocatalog
  src = fetchFromGitHub {
    owner = "radiocatalog";
    repo = "libax25";
    tag = "libax25-${finalAttrs.version}";
    hash = "sha256-MQDrroRZhtWJiu3N7FQVp5/sqe1MDjdwKu4ufnfHTUM=";
  };

  configureFlags = [ "--sysconfdir=/etc" ];

  env = lib.optionalAttrs stdenv.hostPlatform.isStatic {
    LDFLAGS = toString [
      "-static-libgcc"
      "-static"
    ];
  };

  meta = {
    description = "AX.25 library for hamradio applications";
    homepage = "https://linux-ax25.in-berlin.de/wiki/Main_Page";
    license = lib.licenses.lgpl21Only;
    maintainers = with lib.maintainers; [ sarcasticadmin ];
    platforms = lib.platforms.linux;
  };
})