summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoachim Fasting <joachifm@fastmail.fm>2016-06-03 03:19:19 +0200
committerJoachim Fasting <joachifm@fastmail.fm>2016-06-03 15:43:12 +0200
commit07933ad15ff3d159bad3824a072aa52e0b6a2fba (patch)
treed572de7611b6605443b5222a7a5e2214e9c38f29
parent8b2fc35987e62c079fd50980782495360039a9c1 (diff)
tcpcrypt: 0.3-rc1 -> 0.4, refactoring
- Use `fetchFromGitHub` - Cleanup build inputs - meta cleanups - Strip binaries - Multiple outputs
-rw-r--r--pkgs/tools/security/tcpcrypt/default.nix37
1 files changed, 22 insertions, 15 deletions
diff --git a/pkgs/tools/security/tcpcrypt/default.nix b/pkgs/tools/security/tcpcrypt/default.nix
index 4dbcdf71f9f9..48eefcb0f187 100644
--- a/pkgs/tools/security/tcpcrypt/default.nix
+++ b/pkgs/tools/security/tcpcrypt/default.nix
@@ -1,27 +1,34 @@
-{ fetchurl, stdenv, autoconf, automake, libtool, autoreconfHook
-, openssl, libcap, libnfnetlink, libnetfilter_queue
+{ stdenv, fetchFromGitHub, autoreconfHook
+, openssl
+, libcap, libpcap, libnfnetlink, libnetfilter_conntrack, libnetfilter_queue
}:
+with stdenv.lib;
+
stdenv.mkDerivation rec {
- name = "tcpcrypt-0.3-rc1";
+ name = "tcpcrypt-${version}";
+ version = "0.4";
- src = fetchurl {
- url = "https://github.com/scslab/tcpcrypt/archive/v0.3-rc1.tar.gz";
- sha256 = "1k79xfip95kyy91b6rnmsgl66g52zrnm92ln4jms133nm2k9s4sa";
- name = "${name}.tar.gz";
+ src = fetchFromGitHub {
+ repo = "tcpcrypt";
+ owner = "scslab";
+ rev = "v${version}";
+ sha256 = "04n1qpf4x8x289xa7jndmx99xp0lbxjzjw013kf64i1n70i9wbnp";
};
- dontStrip = true;
+ postUnpack = ''mkdir -vp $sourceRoot/m4'';
- buildInputs = [ autoreconfHook autoconf automake libtool openssl libcap libnfnetlink libnetfilter_queue ];
+ outputs = [ "dev" "out" "bin" ];
+ nativeBuildInputs = [ autoreconfHook ];
+ buildInputs = [ openssl ]
+ ++ optionals stdenv.isLinux [ libcap libpcap libnfnetlink libnetfilter_conntrack libnetfilter_queue ];
- postUnpack = ''
- mkdir $sourceRoot/m4
- '';
+ enableParallelBuilding = true;
meta = {
- homepage = "http://tcpcrypt.org/";
- description = "enable opportunistic encryption of all TCP traffic";
- platforms = stdenv.lib.platforms.linux;
+ homepage = http://tcpcrypt.org/;
+ description = "Fast TCP encryption";
+ platforms = platforms.all;
+ license = licenses.bsd2;
};
}