rio: 0.0.36 -> 0.0.37
[NixPkgs.git] / pkgs / tools / networking / openvpn / openvpn-auth-ldap.nix
blobdf93dacb471108a38a37f41c6345ff0fa509ac2c
1 { lib
2 , stdenv
3 , fetchFromGitHub
4 , autoreconfHook
5 , gnustep
6 , re2c
7 , openldap
8 , openssl
9 , openvpn
12 stdenv.mkDerivation rec {
13   pname = "openvpn-auth-ldap";
14   version = "2.0.4";
16   src = fetchFromGitHub {
17     owner = "threerings";
18     repo = "openvpn-auth-ldap";
19     rev = "auth-ldap-${version}";
20     sha256 = "1j30sygj8nm8wjqxzpb7pfzr3dxqxggswzxd7z5yk7y04c0yp1hb";
21   };
23   patches = [
24     ./auth-ldap-fix-conftest.patch
25   ];
27   nativeBuildInputs = [
28     autoreconfHook
29     gnustep.base
30     gnustep.libobjc
31     gnustep.make
32     re2c
33   ];
35   buildInputs = [
36     openldap
37     openssl
38     openvpn
39   ];
41   configureFlags = [
42     "--with-objc-runtime=GNU"
43     "--with-openvpn=${openvpn}/include"
44     "--libdir=$(out)/lib/openvpn"
45   ];
47   doCheck = true;
49   preInstall = ''
50     mkdir -p $out/lib/openvpn $out/share/doc/openvpn/examples
51     cp README.md $out/share/doc/openvpn/
52     cp auth-ldap.conf $out/share/doc/openvpn/examples/
53   '';
55   meta = with lib; {
56     description = "LDAP authentication plugin for OpenVPN";
57     homepage = "https://github.com/threerings/openvpn-auth-ldap";
58     license = [
59       licenses.asl20
60       licenses.bsd3
61     ];
62     maintainers = [ maintainers.benley ];
63     platforms = platforms.unix;
64   };