Files
nixpkgs/pkgs/tools/networking/openvpn/openvpn-auth-ldap.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

78 lines
1.6 KiB
Nix

{
lib,
stdenv,
fetchFromGitHub,
fetchpatch2,
autoreconfHook,
gnustep-base,
re2c,
openldap,
openssl,
openvpn,
}:
stdenv.mkDerivation rec {
pname = "openvpn-auth-ldap";
version = "2.0.4";
src = fetchFromGitHub {
owner = "threerings";
repo = "openvpn-auth-ldap";
rev = "auth-ldap-${version}";
sha256 = "1j30sygj8nm8wjqxzpb7pfzr3dxqxggswzxd7z5yk7y04c0yp1hb";
};
patches = [
./auth-ldap-fix-conftest.patch
(fetchpatch2 {
name = "fix-cve-2024-28820";
url = "https://patch-diff.githubusercontent.com/raw/threerings/openvpn-auth-ldap/pull/92.patch";
hash = "sha256-SXuo1D/WywKO5hCsmoeDdTsR7EelxFxJAKmlAQJ6vuE=";
})
];
# clang > 17 dropped support for `-export-dynamic` but `-rdynamic` does the
# same thing
postPatch = ''
substituteInPlace platform.m4 \
--replace-fail -export-dynamic -rdynamic
'';
nativeBuildInputs = [
autoreconfHook
re2c
];
buildInputs = [
openldap
openssl
openvpn
gnustep-base
];
configureFlags = [
"--with-objc-runtime=GNU"
"--with-openvpn=${openvpn}/include"
"--libdir=$(out)/lib/openvpn"
];
doCheck = true;
preInstall = ''
mkdir -p $out/lib/openvpn $out/share/doc/openvpn/examples
cp README.md $out/share/doc/openvpn/
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;
};
}