about summary refs log tree commit diff
path: root/pkgs/by-name/ax/ax25ms/package.nix
blob: 94a5ca9ce6f836b6a194292c6774dad48eb77746 (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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
{ lib
, stdenv
, fetchFromGitHub
, autoconf
, protobuf
, pkg-config
, grpc
, libtool
, which
, automake
, libax25
}:

stdenv.mkDerivation {
  pname = "ax25ms";
  version = "0-unstable-2024-04-28";

  src = fetchFromGitHub {
    owner = "ThomasHabets";
    repo = "ax25ms";
    rev = "c7d7213bb182e4b60f655c3f9f1bcb2b2440406b";
    hash = "sha256-GljGJa44topJ6T0g5wuU8GTHLKzNmQqUl8/AR+pw2+I=";
  };

  buildInputs = [
    protobuf
    grpc
    libax25
  ];

  nativeBuildInputs = [
    which
    pkg-config
    autoconf
    libtool
    automake
  ];

  preConfigure = ''
    patchShebangs scripts
    ./bootstrap.sh
  '';

  postInstall = ''
    set +e
    for binary_path in "$out/bin"/*; do
      filename=$(basename "$binary_path")
      mv "$binary_path" "$out/bin/ax25ms-$filename"
    done
    set -e
  '';

  meta = with lib; {
    description = "Set of AX.25 microservices, designed to be pluggable for any implementation";
    homepage = "https://github.com/ThomasHabets/ax25ms";
    license = licenses.asl20;
    maintainers = with maintainers; [
      matthewcroughan
      sarcasticadmin
      pkharvey
    ];
    platforms = platforms.all;
  };
}