2021-05-27 22:13:52 +01:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, autoreconfHook
|
|
|
|
, gnustep
|
|
|
|
, re2c
|
|
|
|
, openldap
|
|
|
|
, openssl
|
|
|
|
, openvpn
|
2017-11-01 21:07:01 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2021-05-27 22:13:52 +01:00
|
|
|
pname = "openvpn-auth-ldap";
|
|
|
|
version = "2.0.4";
|
2017-11-01 21:07:01 +00:00
|
|
|
|
2017-11-22 14:00:19 +00:00
|
|
|
src = fetchFromGitHub {
|
2017-11-01 21:07:01 +00:00
|
|
|
owner = "threerings";
|
2021-05-27 22:13:52 +01:00
|
|
|
repo = "openvpn-auth-ldap";
|
|
|
|
rev = "auth-ldap-${version}";
|
|
|
|
sha256 = "1j30sygj8nm8wjqxzpb7pfzr3dxqxggswzxd7z5yk7y04c0yp1hb";
|
2017-11-01 21:07:01 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
autoreconfHook
|
|
|
|
gnustep.base
|
|
|
|
gnustep.libobjc
|
|
|
|
gnustep.make
|
2021-05-27 22:13:52 +01:00
|
|
|
re2c
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
2017-11-01 21:07:01 +00:00
|
|
|
openldap
|
2021-05-27 22:13:52 +01:00
|
|
|
openssl
|
2017-11-01 21:07:01 +00:00
|
|
|
openvpn
|
|
|
|
];
|
|
|
|
|
|
|
|
configureFlags = [
|
2021-05-27 22:13:52 +01:00
|
|
|
"--with-objc-runtime=GNU"
|
2017-11-01 21:07:01 +00:00
|
|
|
"--with-openvpn=${openvpn}/include"
|
|
|
|
"--libdir=$(out)/lib/openvpn"
|
|
|
|
];
|
|
|
|
|
2021-05-27 22:13:52 +01:00
|
|
|
doCheck = true;
|
|
|
|
|
2017-11-01 21:07:01 +00:00
|
|
|
preInstall = ''
|
|
|
|
mkdir -p $out/lib/openvpn $out/share/doc/openvpn/examples
|
2021-05-27 22:13:52 +01:00
|
|
|
cp README.md $out/share/doc/openvpn/
|
2017-11-01 21:07:01 +00:00
|
|
|
cp auth-ldap.conf $out/share/doc/openvpn/examples/
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "LDAP authentication plugin for OpenVPN";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/threerings/openvpn-auth-ldap";
|
2017-11-01 21:07:01 +00:00
|
|
|
license = [
|
|
|
|
licenses.asl20
|
|
|
|
licenses.bsd3
|
|
|
|
];
|
|
|
|
maintainers = [ maintainers.benley ];
|
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|