openvpn: Optional pkcs11 support
This commit is contained in:
parent
ed02a770ae
commit
ea1caf9272
@ -1,4 +1,8 @@
|
|||||||
{ stdenv, fetchurl, iproute, lzo, openssl, pam, systemd, pkgconfig }:
|
{ stdenv, fetchurl, iproute, lzo, openssl, pam, systemd, pkgconfig
|
||||||
|
, pkcs11Support ? false, pkcs11helper ? null,
|
||||||
|
}:
|
||||||
|
|
||||||
|
assert pkcs11Support -> (pkcs11helper != null);
|
||||||
|
|
||||||
with stdenv.lib;
|
with stdenv.lib;
|
||||||
|
|
||||||
@ -13,13 +17,14 @@ stdenv.mkDerivation rec {
|
|||||||
patches = optional stdenv.isLinux ./systemd-notify.patch;
|
patches = optional stdenv.isLinux ./systemd-notify.patch;
|
||||||
|
|
||||||
buildInputs = [ lzo openssl pkgconfig ]
|
buildInputs = [ lzo openssl pkgconfig ]
|
||||||
++ optionals stdenv.isLinux [ pam systemd iproute ];
|
++ optionals stdenv.isLinux [ pam systemd iproute ]
|
||||||
|
++ optional pkcs11Support pkcs11helper;
|
||||||
|
|
||||||
configureFlags = optionalString stdenv.isLinux ''
|
configureFlags = optionals stdenv.isLinux [
|
||||||
--enable-systemd
|
"--enable-systemd"
|
||||||
--enable-iproute2
|
"--enable-iproute2"
|
||||||
IPROUTE=${iproute}/sbin/ip
|
"IPROUTE=${iproute}/sbin/ip" ]
|
||||||
'';
|
++ optional pkcs11Support "--enable-pkcs11";
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
mkdir -p $out/share/doc/openvpn/examples
|
mkdir -p $out/share/doc/openvpn/examples
|
||||||
|
Loading…
x
Reference in New Issue
Block a user