summary refs log tree commit diff
path: root/pkgs/servers/dns/bind/default.nix
diff options
context:
space:
mode:
authorJustin Humm <justin.humm@posteo.de>2020-06-15 21:03:03 +0200
committerJustin Humm <justin.humm@posteo.de>2020-06-15 21:03:03 +0200
commit6cdbb1fb1febfd97ab4490fba461c9eb6453fa33 (patch)
tree2c8fb585a8ae93d5a11aff033d143fca6be254fa /pkgs/servers/dns/bind/default.nix
parentf37456a046fb1bafbea300178717b1b783cd4827 (diff)
downloadnixpkgs-6cdbb1fb1febfd97ab4490fba461c9eb6453fa33.tar
nixpkgs-6cdbb1fb1febfd97ab4490fba461c9eb6453fa33.tar.gz
nixpkgs-6cdbb1fb1febfd97ab4490fba461c9eb6453fa33.tar.bz2
nixpkgs-6cdbb1fb1febfd97ab4490fba461c9eb6453fa33.tar.lz
nixpkgs-6cdbb1fb1febfd97ab4490fba461c9eb6453fa33.tar.xz
nixpkgs-6cdbb1fb1febfd97ab4490fba461c9eb6453fa33.tar.zst
nixpkgs-6cdbb1fb1febfd97ab4490fba461c9eb6453fa33.zip
bind: set BUILD_CC for cross compilation
This is due to a hint by @Ericson2314 in
https://github.com/NixOS/nixpkgs/pull/86166#issuecomment-633153996
Diffstat (limited to 'pkgs/servers/dns/bind/default.nix')
-rw-r--r--pkgs/servers/dns/bind/default.nix3
1 files changed, 2 insertions, 1 deletions
diff --git a/pkgs/servers/dns/bind/default.nix b/pkgs/servers/dns/bind/default.nix
index a7581ccbb11..2aae5634cc5 100644
--- a/pkgs/servers/dns/bind/default.nix
+++ b/pkgs/servers/dns/bind/default.nix
@@ -54,7 +54,8 @@ stdenv.mkDerivation rec {
     "--without-eddsa"
     "--with-aes"
   ] ++ lib.optional stdenv.isLinux "--with-libcap=${libcap.dev}"
-    ++ lib.optional enableSeccomp "--enable-seccomp";
+    ++ lib.optional enableSeccomp "--enable-seccomp"
+    ++ lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) "BUILD_CC=$(CC_FOR_BUILD)";
 
   postInstall = ''
     moveToOutput bin/bind9-config $dev