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

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

}:

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

  src = frrSource;

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

  buildInputs = [
    python3
  ] ++ lib.optionals (lib.meta.availableOn stdenv.hostPlatform elfutils) [
    elfutils
  ];

  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;
  };
}