1 { lib, stdenv, fetchFromGitHub
2 , makeWrapper, pkg-config, perl
3 , gnutls, libgcrypt, vpnc-scripts
4 , opensslSupport ? false, openssl # Distributing this is a GPL violation.
9 version = "unstable-2021-11-04";
11 src = fetchFromGitHub {
12 owner = "streambinder";
14 rev = "c8bb5371b881f8853f191c495e762f834c9def5d";
15 sha256 = "1j1p83nfc2fpwczjcggsby0b44hk97ky0s6vns6md3awlbpgdn57";
16 fetchSubmodules = true;
19 nativeBuildInputs = [ makeWrapper ]
20 ++ lib.optional (!opensslSupport) pkg-config;
21 buildInputs = [ libgcrypt perl ]
22 ++ (if opensslSupport then [ openssl ] else [ gnutls ]);
26 "ETCDIR=$(out)/etc/vpnc"
27 "SCRIPT_PATH=${vpnc-scripts}/bin/vpnc-script"
28 ] ++ lib.optional opensslSupport "OPENSSL_GPL_VIOLATION=yes";
30 env = lib.optionalAttrs stdenv.cc.isGNU {
31 NIX_CFLAGS_COMPILE = "-Wno-error=implicit-function-declaration";
35 patchShebangs src/makeman.pl
38 enableParallelBuilding = true;
39 # Missing install depends:
40 # install: target '...-vpnc-unstable-2021-11-04/share/doc/vpnc': No such file or directory
41 # make: *** [Makefile:149: install-doc] Error 1
42 enableParallelInstalling = false;
45 homepage = "https://davidepucci.it/doc/vpnc/";
46 description = "Virtual private network (VPN) client for Cisco's VPN concentrators";
47 license = if opensslSupport then licenses.unfree else licenses.gpl2Plus;
48 platforms = platforms.linux;