From be7e90d6f70ac07478db558a678b667234a08b2d Mon Sep 17 00:00:00 2001 From: David McFarland Date: Wed, 1 Oct 2025 15:43:02 -0300 Subject: [PATCH] gnutar: fix cygwin build --- pkgs/tools/archivers/gnutar/default.nix | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/pkgs/tools/archivers/gnutar/default.nix b/pkgs/tools/archivers/gnutar/default.nix index 02eae53b58e0..1ddcfb22f04b 100644 --- a/pkgs/tools/archivers/gnutar/default.nix +++ b/pkgs/tools/archivers/gnutar/default.nix @@ -5,6 +5,7 @@ autoreconfHook, updateAutotoolsGnuConfigScriptsHook, libintl, + gettext, aclSupport ? lib.meta.availableOn stdenv.hostPlatform acl, acl, }: @@ -46,7 +47,13 @@ stdenv.mkDerivation rec { # "_libintl_textdomain", referenced from: # _main in tar.o # ld: symbol(s) not found for architecture x86_64 - buildInputs = lib.optional aclSupport acl ++ lib.optional stdenv.hostPlatform.isDarwin libintl; + buildInputs = + lib.optional aclSupport acl + ++ lib.optional stdenv.hostPlatform.isDarwin libintl + # gettext gets pulled in via autoreconfHook because strictDeps is not set, + # and is linked against. Without this, it doesn't end up in HOST_PATH. + # TODO: enable strictDeps, and either make this dependency explicit, or remove it + ++ lib.optional stdenv.hostPlatform.isCygwin gettext; # May have some issues with root compilation because the bootstrap tool # cannot be used as a login shell for now. @@ -54,14 +61,6 @@ stdenv.mkDerivation rec { stdenv.hostPlatform.system == "armv7l-linux" || stdenv.hostPlatform.isSunOS ) "1"; - preConfigure = - if stdenv.hostPlatform.isCygwin then - '' - sed -i gnu/fpending.h -e 's,include ,,' - '' - else - null; - doCheck = false; # fails doInstallCheck = false; # fails