about summary refs log tree commit diff
path: root/pkgs/servers/frr/clippy-helper.nix
blob: 9e554d4e17e6fa54ce1180a53786ba7d7506a2f3 (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
{ lib
, stdenv
, frr_source
, frr_version

# build time
, autoreconfHook
, flex
, bison
, pkg-config
, libelf
, perl
, python3

}:

stdenv.mkDerivation rec {
  pname = "frr-clippy-helper";
  version = frr_version;

  src = frr_source;

  nativeBuildInputs = [
    autoreconfHook
    bison
    flex
    perl
    pkg-config
  ];

  buildInputs = [
    libelf
    python3
  ];

  configureFlags = [
    "--enable-clippy-only"
  ];

  installPhase = ''
    mkdir -p $out/bin
    cp lib/clippy $out/bin
  '';

  enableParallelBuilding = true;

  meta = with lib; {
    homepage = "https://frrouting.org/";
    description = "FRR routing daemon suite: CLI helper tool clippy";
    longDescription = ''
      This small tool is used to support generating CLI code for FRR. It is split out here,
      to support cross-compiling, because it needs to be compiled with the build system toolchain
      and not the target host one.
    '';
    license = with licenses; [ gpl2Plus lgpl21Plus ];
    maintainers = with maintainers; [ thillux ];
    platforms = platforms.unix;
  };
}