Merge pull request #33383 from kierdavis/openvpn-optional-systemd
openvpn: make systemd dependency optional
This commit is contained in:
commit
6e8021d412
|
@ -1,7 +1,9 @@
|
||||||
{ stdenv, fetchurl, iproute, lzo, openssl, pam, systemd, pkgconfig
|
{ stdenv, fetchurl, iproute, lzo, openssl, pam, pkgconfig
|
||||||
|
, useSystemd ? stdenv.isLinux, systemd ? null
|
||||||
, pkcs11Support ? false, pkcs11helper ? null,
|
, pkcs11Support ? false, pkcs11helper ? null,
|
||||||
}:
|
}:
|
||||||
|
|
||||||
|
assert useSystemd -> (systemd != null);
|
||||||
assert pkcs11Support -> (pkcs11helper != null);
|
assert pkcs11Support -> (pkcs11helper != null);
|
||||||
|
|
||||||
with stdenv.lib;
|
with stdenv.lib;
|
||||||
|
@ -17,13 +19,14 @@ stdenv.mkDerivation rec {
|
||||||
|
|
||||||
nativeBuildInputs = [ pkgconfig ];
|
nativeBuildInputs = [ pkgconfig ];
|
||||||
buildInputs = [ lzo openssl ]
|
buildInputs = [ lzo openssl ]
|
||||||
++ optionals stdenv.isLinux [ pam systemd iproute ]
|
++ optionals stdenv.isLinux [ pam iproute ]
|
||||||
|
++ optional useSystemd systemd
|
||||||
++ optional pkcs11Support pkcs11helper;
|
++ optional pkcs11Support pkcs11helper;
|
||||||
|
|
||||||
configureFlags = optionals stdenv.isLinux [
|
configureFlags = optionals stdenv.isLinux [
|
||||||
"--enable-systemd"
|
|
||||||
"--enable-iproute2"
|
"--enable-iproute2"
|
||||||
"IPROUTE=${iproute}/sbin/ip" ]
|
"IPROUTE=${iproute}/sbin/ip" ]
|
||||||
|
++ optional useSystemd "--enable-systemd"
|
||||||
++ optional pkcs11Support "--enable-pkcs11"
|
++ optional pkcs11Support "--enable-pkcs11"
|
||||||
++ optional stdenv.isDarwin "--disable-plugin-auth-pam";
|
++ optional stdenv.isDarwin "--disable-plugin-auth-pam";
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue