summaryrefslogtreecommitdiffstats
path: root/pkgs/tools/security/fwknop
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2018-07-25 17:44:21 -0400
committerJohn Ericson <John.Ericson@Obsidian.Systems>2018-08-03 17:06:03 -0400
commit85a9913edd50b7ea9b4dfbaedd5d40a739b97d3e (patch)
tree544a86c87280e6870fefe3005d2b9387a6b48581 /pkgs/tools/security/fwknop
parent632d24f11f51cc1581e921aa0eb8c6669296e8de (diff)
treewide: Make more complicated configureFlags lists
Diffstat (limited to 'pkgs/tools/security/fwknop')
-rw-r--r--pkgs/tools/security/fwknop/default.nix29
1 files changed, 13 insertions, 16 deletions
diff --git a/pkgs/tools/security/fwknop/default.nix b/pkgs/tools/security/fwknop/default.nix
index 04e6d12fe427..5f4fbea9fcd9 100644
--- a/pkgs/tools/security/fwknop/default.nix
+++ b/pkgs/tools/security/fwknop/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchFromGitHub, autoreconfHook, lib
+{ stdenv, fetchFromGitHub, autoreconfHook
, libpcap, texinfo
, iptables
, gnupgSupport ? true, gnupg, gpgme # Increases dependencies!
@@ -23,21 +23,18 @@ stdenv.mkDerivation rec {
++ stdenv.lib.optional gnupgSupport [ gnupg gpgme.dev ]
++ stdenv.lib.optional wgetSupport [ wget ];
- configureFlags = ''
- --sysconfdir=/etc
- --localstatedir=/run
- --with-iptables=${iptables}/sbin/iptables
- ${lib.optionalString (!buildServer) "--disable-server"}
- ${lib.optionalString (!buildClient) "--disable-client"}
- ${lib.optionalString gnupgSupport ''
- --with-gpgme
- --with-gpgme-prefix=${gpgme.dev}
- --with-gpg=${gnupg}
- ''}
- ${lib.optionalString wgetSupport ''
- --with-wget=${wget}/bin/wget
- ''}
- '';
+ configureFlags = [
+ "--sysconfdir=/etc"
+ "--localstatedir=/run"
+ "--with-iptables=${iptables}/sbin/iptables"
+ (stdenv.lib.enableFeature buildServer "server")
+ (stdenv.lib.enableFeature buildClient "client")
+ (stdenv.lib.withFeatureAs wgetSupport wget "${wget}/bin/wget")
+ ] ++ stdenv.lib.optionalString gnupgSupport [
+ "--with-gpgme"
+ "--with-gpgme-prefix=${gpgme.dev}"
+ "--with-gpg=${gnupg}"
+ ];
# Temporary hack to copy the example configuration files into the nix-store,
# this'll probably be helpful until there's a NixOS module for that (feel free