about summary refs log tree commit diff
path: root/pkgs/servers/dns/bind/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/servers/dns/bind/default.nix')
-rw-r--r--pkgs/servers/dns/bind/default.nix9
1 files changed, 6 insertions, 3 deletions
diff --git a/pkgs/servers/dns/bind/default.nix b/pkgs/servers/dns/bind/default.nix
index 86e756a0db37..4002c6b3542f 100644
--- a/pkgs/servers/dns/bind/default.nix
+++ b/pkgs/servers/dns/bind/default.nix
@@ -1,8 +1,10 @@
 { stdenv, lib, fetchurl, openssl, libtool, perl, libxml2
+, enablePython ? false, python3 ? null
 , enableSeccomp ? false, libseccomp ? null, buildPackages
 }:
 
 assert enableSeccomp -> libseccomp != null;
+assert enablePython -> python3 != null;
 
 let version = "9.12.1"; in
 
@@ -20,8 +22,9 @@ stdenv.mkDerivation rec {
     stdenv.lib.optional stdenv.isDarwin ./darwin-openssl-linking-fix.patch;
 
   nativeBuildInputs = [ perl ];
-  buildInputs = [ openssl libtool libxml2 ] ++
-    stdenv.lib.optional enableSeccomp libseccomp;
+  buildInputs = [ openssl libtool libxml2 ]
+    ++ lib.optional enableSeccomp libseccomp
+    ++ lib.optional enablePython python3;
 
   STD_CDEFINES = [ "-DDIG_SIGCHASE=1" ]; # support +sigchase
 
@@ -32,6 +35,7 @@ stdenv.mkDerivation rec {
     "--with-libtool"
     "--with-libxml2=${libxml2.dev}"
     "--with-openssl=${openssl.dev}"
+    (if enablePython then "--with-python" else "--without-python")
     "--without-atf"
     "--without-dlopen"
     "--without-docbook-xsl"
@@ -41,7 +45,6 @@ stdenv.mkDerivation rec {
     "--without-lmdb"
     "--without-pkcs11"
     "--without-purify"
-    "--without-python"
     "--with-randomdev=/dev/random"
     "--with-ecdsa"
     "--with-gost"