summary refs log tree commit diff
path: root/pkgs/servers/dns/bind/default.nix
diff options
context:
space:
mode:
authorShea Levy <shea@shealevy.com>2018-02-27 17:27:48 -0500
committerShea Levy <shea@shealevy.com>2018-02-28 15:01:31 -0500
commita1e219e56245e46bbb68096c7a64cf0ac66ff4ec (patch)
tree4e151a8f67636f4738ec72e62e087ffa3fd264a6 /pkgs/servers/dns/bind/default.nix
parent085bfcefb908fb503a16bd8fba9d4f5ba82d37ad (diff)
downloadnixpkgs-a1e219e56245e46bbb68096c7a64cf0ac66ff4ec.tar
nixpkgs-a1e219e56245e46bbb68096c7a64cf0ac66ff4ec.tar.gz
nixpkgs-a1e219e56245e46bbb68096c7a64cf0ac66ff4ec.tar.bz2
nixpkgs-a1e219e56245e46bbb68096c7a64cf0ac66ff4ec.tar.lz
nixpkgs-a1e219e56245e46bbb68096c7a64cf0ac66ff4ec.tar.xz
nixpkgs-a1e219e56245e46bbb68096c7a64cf0ac66ff4ec.tar.zst
nixpkgs-a1e219e56245e46bbb68096c7a64cf0ac66ff4ec.zip
bind: Fix cross-compilation
Diffstat (limited to 'pkgs/servers/dns/bind/default.nix')
-rw-r--r--pkgs/servers/dns/bind/default.nix14
1 files changed, 13 insertions, 1 deletions
diff --git a/pkgs/servers/dns/bind/default.nix b/pkgs/servers/dns/bind/default.nix
index c0176db1576..e2262cdb7c8 100644
--- a/pkgs/servers/dns/bind/default.nix
+++ b/pkgs/servers/dns/bind/default.nix
@@ -1,5 +1,6 @@
 { stdenv, lib, fetchurl, openssl, libtool, perl, libxml2
-, enableSeccomp ? false, libseccomp ? null }:
+, enableSeccomp ? false, libseccomp ? null, buildPackages
+}:
 
 assert enableSeccomp -> libseccomp != null;
 
@@ -13,6 +14,8 @@ stdenv.mkDerivation rec {
     sha256 = "10iwkghl5g50b7wc17bsb9wa0dh2gd57bjlk6ynixhywz6dhx1r9";
   };
 
+  preConfigure = "export AR=${stdenv.cc}/bin/${stdenv.cc.targetPrefix}ar";
+
   outputs = [ "out" "lib" "dev" "man" "dnsutils" "host" ];
 
   patches = [ ./dont-keep-configure-flags.patch ./remove-mkdir-var.patch ] ++
@@ -24,6 +27,10 @@ stdenv.mkDerivation rec {
 
   STD_CDEFINES = [ "-DDIG_SIGCHASE=1" ]; # support +sigchase
 
+  BUILD_CC = "cc";
+
+  depsBuildBuild = [ buildPackages.stdenv.cc ];
+
   configureFlags = [
     "--localstatedir=/var"
     "--with-libtool"
@@ -39,6 +46,11 @@ stdenv.mkDerivation rec {
     "--without-pkcs11"
     "--without-purify"
     "--without-python"
+    "--with-randomdev=/dev/random"
+    "--with-ecdsa"
+    "--with-gost"
+    "--without-eddsa"
+    "--with-aes"
   ] ++ lib.optional enableSeccomp "--enable-seccomp";
 
   postInstall = ''