2023-08-04 22:07:22 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub
|
2022-04-27 09:35:20 +00:00
|
|
|
, makeWrapper, pkg-config, perl
|
2023-08-04 22:07:22 +00:00
|
|
|
, gnutls, libgcrypt, vpnc-scripts
|
2022-02-20 05:27:41 +00:00
|
|
|
, opensslSupport ? false, openssl # Distributing this is a GPL violation.
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
2021-08-05 21:33:18 +00:00
|
|
|
pname = "vpnc";
|
2022-04-27 09:35:20 +00:00
|
|
|
version = "unstable-2021-11-04";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "streambinder";
|
|
|
|
repo = "vpnc";
|
|
|
|
rev = "c8bb5371b881f8853f191c495e762f834c9def5d";
|
|
|
|
sha256 = "1j1p83nfc2fpwczjcggsby0b44hk97ky0s6vns6md3awlbpgdn57";
|
|
|
|
fetchSubmodules = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-02-20 05:27:41 +00:00
|
|
|
nativeBuildInputs = [ makeWrapper ]
|
|
|
|
++ lib.optional (!opensslSupport) pkg-config;
|
|
|
|
buildInputs = [ libgcrypt perl ]
|
|
|
|
++ (if opensslSupport then [ openssl ] else [ gnutls ]);
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
makeFlags = [
|
|
|
|
"PREFIX=$(out)"
|
|
|
|
"ETCDIR=$(out)/etc/vpnc"
|
2022-04-27 09:35:20 +00:00
|
|
|
"SCRIPT_PATH=${vpnc-scripts}/bin/vpnc-script"
|
2022-02-20 05:27:41 +00:00
|
|
|
] ++ lib.optional opensslSupport "OPENSSL_GPL_VIOLATION=yes";
|
2021-12-06 16:07:01 +00:00
|
|
|
|
|
|
|
postPatch = ''
|
2022-04-27 09:35:20 +00:00
|
|
|
patchShebangs src/makeman.pl
|
2021-12-06 16:07:01 +00:00
|
|
|
'';
|
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
enableParallelBuilding = true;
|
2023-03-27 19:17:25 +00:00
|
|
|
# Missing install depends:
|
|
|
|
# install: target '...-vpnc-unstable-2021-11-04/share/doc/vpnc': No such file or directory
|
|
|
|
# make: *** [Makefile:149: install-doc] Error 1
|
|
|
|
enableParallelInstalling = false;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-02-20 05:27:41 +00:00
|
|
|
meta = with lib; {
|
2022-04-27 09:35:20 +00:00
|
|
|
homepage = "https://davidepucci.it/doc/vpnc/";
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Virtual private network (VPN) client for Cisco's VPN concentrators";
|
2022-02-20 05:27:41 +00:00
|
|
|
license = if opensslSupport then licenses.unfree else licenses.gpl2Plus;
|
|
|
|
platforms = platforms.linux;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|