From 491667f8a95d89d3401bd9cfa99021cf7a7eb7b5 Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Wed, 5 Apr 2023 19:21:22 -0700 Subject: [PATCH 1/2] dante: autoreconfHook unconditionally --- pkgs/servers/dante/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/servers/dante/default.nix b/pkgs/servers/dante/default.nix index f5b2e5a785fc..571572baca22 100644 --- a/pkgs/servers/dante/default.nix +++ b/pkgs/servers/dante/default.nix @@ -10,7 +10,7 @@ stdenv.mkDerivation rec { sha256 = "0pbahkj43rx7rmv2x40mf5p3g3x9d6i2sz7pzglarf54w5ghd2j1"; }; - nativeBuildInputs = lib.optional stdenv.hostPlatform.isMips64 autoreconfHook; + nativeBuildInputs = [ autoreconfHook ]; buildInputs = [ pam libkrb5 cyrus_sasl miniupnpc libxcrypt ]; configureFlags = if !stdenv.isDarwin From 17ceaffab1a67a0e76c11ae88e68711cd9c06104 Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Wed, 5 Apr 2023 19:01:07 -0700 Subject: [PATCH 2/2] dante: disable getaddrinfo() checks if cross Prior to this commit, dante's configure-time getaddrinfo() checks were disabled only if stdenv.hostPlatform.isMips64. These checks must also be disabled if the buildPlatform cannot execute hostPlatform binaries. This commit factors out the control of this disablement as a flag and adds an additional situation in which that flag is enabled. --- pkgs/servers/dante/default.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkgs/servers/dante/default.nix b/pkgs/servers/dante/default.nix index 571572baca22..49e6a26f455f 100644 --- a/pkgs/servers/dante/default.nix +++ b/pkgs/servers/dante/default.nix @@ -1,6 +1,9 @@ { lib, stdenv, fetchurl, fetchpatch, autoreconfHook , pam, libkrb5, cyrus_sasl, miniupnpc, libxcrypt }: +let + remove_getaddrinfo_checks = stdenv.hostPlatform.isMips64 || !(stdenv.buildPlatform.canExecute stdenv.hostPlatform); +in stdenv.mkDerivation rec { pname = "dante"; version = "1.4.3"; @@ -19,7 +22,7 @@ stdenv.mkDerivation rec { dontAddDisableDepTrack = stdenv.isDarwin; - patches = lib.optionals stdenv.hostPlatform.isMips64 [ + patches = lib.optionals remove_getaddrinfo_checks [ (fetchpatch { name = "0002-osdep-m4-Remove-getaddrinfo-too-low-checks.patch"; url = "https://raw.githubusercontent.com/buildroot/buildroot/master/package/dante/0002-osdep-m4-Remove-getaddrinfo-too-low-checks.patch";