1{ lib, stdenv, fetchFromGitHub, autoreconfHook
2, openssl
3, libcap, libpcap, libnfnetlink, libnetfilter_conntrack, libnetfilter_queue
4}:
5
6stdenv.mkDerivation rec {
7 pname = "tcpcrypt";
8 version = "0.5";
9
10 src = fetchFromGitHub {
11 repo = "tcpcrypt";
12 owner = "scslab";
13 rev = "v${version}";
14 sha256 = "0a015rlyvagz714pgwr85f8gjq1fkc0il7d7l39qcgxrsp15b96w";
15 };
16
17 postUnpack = "mkdir -vp $sourceRoot/m4";
18
19 outputs = [ "bin" "dev" "out" ];
20 nativeBuildInputs = [ autoreconfHook ];
21 buildInputs = [ openssl libpcap ]
22 ++ lib.optionals stdenv.isLinux [ libcap libnfnetlink libnetfilter_conntrack libnetfilter_queue ];
23
24 enableParallelBuilding = true;
25
26 meta = with lib; {
27 broken = stdenv.isDarwin;
28 homepage = "http://tcpcrypt.org/";
29 description = "Fast TCP encryption";
30 platforms = platforms.all;
31 license = licenses.bsd2;
32 };
33}