tcpcrypt: 0.3-rc1 -> 0.4, refactoring

- Use `fetchFromGitHub`
- Cleanup build inputs
- meta cleanups
- Strip binaries
- Multiple outputs
This commit is contained in:
Joachim Fasting 2016-06-03 03:19:19 +02:00
parent 8b2fc35987
commit 07933ad15f
No known key found for this signature in database
GPG Key ID: 4330820E1E04DCF4

View File

@ -1,27 +1,34 @@
{ fetchurl, stdenv, autoconf, automake, libtool, autoreconfHook { stdenv, fetchFromGitHub, autoreconfHook
, openssl, libcap, libnfnetlink, libnetfilter_queue , openssl
, libcap, libpcap, libnfnetlink, libnetfilter_conntrack, libnetfilter_queue
}: }:
stdenv.mkDerivation rec { with stdenv.lib;
name = "tcpcrypt-0.3-rc1";
src = fetchurl { stdenv.mkDerivation rec {
url = "https://github.com/scslab/tcpcrypt/archive/v0.3-rc1.tar.gz"; name = "tcpcrypt-${version}";
sha256 = "1k79xfip95kyy91b6rnmsgl66g52zrnm92ln4jms133nm2k9s4sa"; version = "0.4";
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 = '' enableParallelBuilding = true;
mkdir $sourceRoot/m4
'';
meta = { meta = {
homepage = "http://tcpcrypt.org/"; homepage = http://tcpcrypt.org/;
description = "enable opportunistic encryption of all TCP traffic"; description = "Fast TCP encryption";
platforms = stdenv.lib.platforms.linux; platforms = platforms.all;
license = licenses.bsd2;
}; };
} }