summaryrefslogtreecommitdiffstats
path: root/pkgs/by-name/li/libnet/package.nix
blob: 19357da19882f8134db9c7c6cc4ebdef9f4b0546 (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
47
48
49
50
51
52
53
{
  lib,
  stdenv,
  fetchFromGitHub,
  autoconf,
  automake,
  libtool,
  bash,
}:

stdenv.mkDerivation (finalAttrs: {
  pname = "libnet";
  version = "1.3";

  src = fetchFromGitHub {
    owner = "libnet";
    repo = "libnet";
    rev = "v${finalAttrs.version}";
    hash = "sha256-P3LaDMMNPyEnA8nO1Bm7H0mW/hVBr0cFdg+p2JmWcGI=";
  };

  strictDeps = true;
  enableParallelBuilding = true;

  outputs = [
    "out"
    "dev"
  ];

  nativeBuildInputs = [
    autoconf
    automake
    libtool
  ];

  buildInputs = [
    bash
  ];

  preConfigure = "./autogen.sh";

  preFixup = ''
    moveToOutput bin/libnet-config "$dev"
  '';

  meta = {
    homepage = "https://github.com/libnet/libnet";
    description = "Portable framework for low-level network packet construction";
    mainProgram = "libnet-config";
    license = lib.licenses.bsd3;
    platforms = lib.platforms.unix;
  };
})