biome: 1.9.2 -> 1.9.3
[NixPkgs.git] / pkgs / tools / networking / openvpn / openvpn-auth-ldap.nix
blobb5cbb8c3295e7bf594cdfe808d0b2f7cfb73ee1f
2   lib,
3   stdenv,
4   fetchFromGitHub,
5   fetchpatch2,
6   autoreconfHook,
7   gnustep,
8   re2c,
9   openldap,
10   openssl,
11   openvpn,
14 stdenv.mkDerivation rec {
15   pname = "openvpn-auth-ldap";
16   version = "2.0.4";
18   src = fetchFromGitHub {
19     owner = "threerings";
20     repo = "openvpn-auth-ldap";
21     rev = "auth-ldap-${version}";
22     sha256 = "1j30sygj8nm8wjqxzpb7pfzr3dxqxggswzxd7z5yk7y04c0yp1hb";
23   };
25   patches = [
26     ./auth-ldap-fix-conftest.patch
27     (fetchpatch2 {
28       name = "fix-cve-2024-28820";
29       url = "https://patch-diff.githubusercontent.com/raw/threerings/openvpn-auth-ldap/pull/92.patch";
30       hash = "sha256-SXuo1D/WywKO5hCsmoeDdTsR7EelxFxJAKmlAQJ6vuE=";
31     })
32   ];
34   nativeBuildInputs = [
35     autoreconfHook
36     gnustep.base
37     gnustep.libobjc
38     gnustep.make
39     re2c
40   ];
42   buildInputs = [
43     openldap
44     openssl
45     openvpn
46   ];
48   configureFlags = [
49     "--with-objc-runtime=GNU"
50     "--with-openvpn=${openvpn}/include"
51     "--libdir=$(out)/lib/openvpn"
52   ];
54   doCheck = true;
56   preInstall = ''
57     mkdir -p $out/lib/openvpn $out/share/doc/openvpn/examples
58     cp README.md $out/share/doc/openvpn/
59     cp auth-ldap.conf $out/share/doc/openvpn/examples/
60   '';
62   meta = with lib; {
63     description = "LDAP authentication plugin for OpenVPN";
64     homepage = "https://github.com/threerings/openvpn-auth-ldap";
65     license = [
66       licenses.asl20
67       licenses.bsd3
68     ];
69     maintainers = [ maintainers.benley ];
70     platforms = platforms.unix;
71   };