summary refs log tree commit diff
path: root/pkgs/tools/networking/vtun/default.nix
blob: d2cbb5d8a4eed10a6b630a3e0a706e5c18206598 (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
{ stdenv, fetchurl, fetchpatch, openssl, lzo, zlib, yacc, flex }:

stdenv.mkDerivation rec {
  name = "vtun-3.0.4";

  src = fetchurl {
    url = "mirror://sourceforge/vtun/${name}.tar.gz";
    sha256 = "1fcqzn2bdjw31j1hvv6lg99v2phhszm29kp2xambxzp32mmxzy5b";
  };

  patches = [
    (fetchpatch { url = http://sources.debian.net/data/main/v/vtun/3.0.3-2.2/debian/patches/08-gcc5-inline.patch;
                 sha256 = "18sys97v2hx6vac5zp3ld7sa6kz4izv3g9dnkm0lflbaxhym2vs1";
                })
  ];

  postPatch = ''
    sed -i -e 's/-m 755//' -e 's/-o root -g 0//' Makefile.in
    sed -i '/strip/d' Makefile.in
  '';
  buildInputs = [ lzo openssl zlib yacc flex ];

  configureFlags = [
    "--with-lzo-headers=${lzo}/include/lzo"
    "--with-ssl-headers=${openssl.dev}/include/openssl"
    "--with-blowfish-headers=${openssl.dev}/include/openssl"
  ];

  meta = with stdenv.lib; {
      description = "Virtual Tunnels over TCP/IP with traffic shaping, compression and encryption";
      homepage = http://vtun.sourceforge.net/;
      license = licenses.gpl2;
      platforms = platforms.linux;
      maintainers = with maintainers; [ pSub ];
  };
}