about summary refs log tree commit diff
path: root/pkgs/tools
diff options
context:
space:
mode:
authorAlexey Shmalko <rasen.dubi@gmail.com>2016-09-18 14:43:07 +0300
committerGitHub <noreply@github.com>2016-09-18 14:43:07 +0300
commit19898d8284399fc9e297ad58eedba3f3abac8d9c (patch)
treeed49144d59394ef57676a8a7097d2f4ccdd2edc2 /pkgs/tools
parent01e44ac1f9af1d42ee9b5000426b780f2a03c948 (diff)
parentea1caf92725f72c8cb1a0f68c54fe7e6a6f41e8f (diff)
downloadnixlib-19898d8284399fc9e297ad58eedba3f3abac8d9c.tar
nixlib-19898d8284399fc9e297ad58eedba3f3abac8d9c.tar.gz
nixlib-19898d8284399fc9e297ad58eedba3f3abac8d9c.tar.bz2
nixlib-19898d8284399fc9e297ad58eedba3f3abac8d9c.tar.lz
nixlib-19898d8284399fc9e297ad58eedba3f3abac8d9c.tar.xz
nixlib-19898d8284399fc9e297ad58eedba3f3abac8d9c.tar.zst
nixlib-19898d8284399fc9e297ad58eedba3f3abac8d9c.zip
Merge pull request #18650 from Ericson2314/openvpn-pkcs11
pkcs11-helper: git rev -> 1.11, openvpn w/ pkcs11-helper support 
Diffstat (limited to 'pkgs/tools')
-rw-r--r--pkgs/tools/networking/openvpn/default.nix21
1 files changed, 13 insertions, 8 deletions
diff --git a/pkgs/tools/networking/openvpn/default.nix b/pkgs/tools/networking/openvpn/default.nix
index e666cf7f605d..3f4f1244e1b7 100644
--- a/pkgs/tools/networking/openvpn/default.nix
+++ b/pkgs/tools/networking/openvpn/default.nix
@@ -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;
 
@@ -13,13 +17,14 @@ stdenv.mkDerivation rec {
   patches = optional stdenv.isLinux ./systemd-notify.patch;
 
   buildInputs = [ lzo openssl pkgconfig ]
-                  ++ optionals stdenv.isLinux [ pam systemd iproute ];
-
-  configureFlags = optionalString stdenv.isLinux ''
-    --enable-systemd
-    --enable-iproute2
-    IPROUTE=${iproute}/sbin/ip
-  '';
+                  ++ optionals stdenv.isLinux [ pam systemd iproute ]
+                  ++ optional pkcs11Support pkcs11helper;
+
+  configureFlags = optionals stdenv.isLinux [
+    "--enable-systemd"
+    "--enable-iproute2"
+    "IPROUTE=${iproute}/sbin/ip" ]
+    ++ optional pkcs11Support "--enable-pkcs11";
 
   postInstall = ''
     mkdir -p $out/share/doc/openvpn/examples