diff options
author | John Ericson <John.Ericson@Obsidian.Systems> | 2018-07-25 17:44:21 -0400 |
---|---|---|
committer | John Ericson <John.Ericson@Obsidian.Systems> | 2018-08-03 17:06:03 -0400 |
commit | 85a9913edd50b7ea9b4dfbaedd5d40a739b97d3e (patch) | |
tree | 544a86c87280e6870fefe3005d2b9387a6b48581 /pkgs/tools/security/fwknop | |
parent | 632d24f11f51cc1581e921aa0eb8c6669296e8de (diff) | |
download | nixlib-85a9913edd50b7ea9b4dfbaedd5d40a739b97d3e.tar nixlib-85a9913edd50b7ea9b4dfbaedd5d40a739b97d3e.tar.gz nixlib-85a9913edd50b7ea9b4dfbaedd5d40a739b97d3e.tar.bz2 nixlib-85a9913edd50b7ea9b4dfbaedd5d40a739b97d3e.tar.lz nixlib-85a9913edd50b7ea9b4dfbaedd5d40a739b97d3e.tar.xz nixlib-85a9913edd50b7ea9b4dfbaedd5d40a739b97d3e.tar.zst nixlib-85a9913edd50b7ea9b4dfbaedd5d40a739b97d3e.zip |
treewide: Make more complicated configureFlags lists
Diffstat (limited to 'pkgs/tools/security/fwknop')
-rw-r--r-- | pkgs/tools/security/fwknop/default.nix | 29 |
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 |