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