From 37dd347cd31c9eeecf991bc062c00ca6f8b9dee4 Mon Sep 17 00:00:00 2001 From: Andreas Rammhold Date: Sat, 27 Apr 2019 17:51:43 +0200 Subject: [PATCH] bind: apply atomics to refcount patch Upstream added a commit [1] right after the release that fixes the aarch64 atomic operation linker issue we have been seeing [2]. [1] https://gitlab.isc.org/isc-projects/bind9/commit/d72f436b7d7c697b262968c48c2d7643069ab17f [2] https://github.com/NixOS/nixpkgs/issues/60301#issue-437896459 --- pkgs/servers/dns/bind/default.nix | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/pkgs/servers/dns/bind/default.nix b/pkgs/servers/dns/bind/default.nix index 683eacee61a..06883414004 100644 --- a/pkgs/servers/dns/bind/default.nix +++ b/pkgs/servers/dns/bind/default.nix @@ -1,4 +1,4 @@ -{ config, stdenv, lib, fetchurl +{ config, stdenv, lib, fetchurl, fetchpatch , perl , libcap, libtool, libxml2, openssl , enablePython ? config.bind.enablePython or false, python3 ? null @@ -21,6 +21,16 @@ stdenv.mkDerivation rec { outputs = [ "out" "lib" "dev" "man" "dnsutils" "host" ]; patches = [ ./dont-keep-configure-flags.patch ./remove-mkdir-var.patch ] ++ + [ + # Workaround for missing atomic operations on aarch64. Upstream added the + # below patch after the release. Can probably be dropped with the next + # version. + (fetchpatch { + name = "client-atomics-as-refcount.patch"; + url = https://gitlab.isc.org/isc-projects/bind9/commit/d72f436b7d7c697b262968c48c2d7643069ab17f.diff; + sha256 = "0sidlab9wcv21751fbq3h9m4wy6hk7frag9ar2jndw8rn3axr2qy"; + }) + ] ++ stdenv.lib.optional stdenv.isDarwin ./darwin-openssl-linking-fix.patch; nativeBuildInputs = [ perl ];