summary refs log tree commit diff
path: root/pkgs/tools/archivers
diff options
context:
space:
mode:
authorSergei Trofimovich <slyich@gmail.com>2023-07-23 09:24:44 +0100
committerSergei Trofimovich <slyich@gmail.com>2023-07-23 09:39:31 +0100
commite37a0e09e21d34dbca2d6f0f7efb7f36437809ac (patch)
tree3ee4190c0d5f81b77a6c353bcbaa947546d6bff4 /pkgs/tools/archivers
parentd5ba15544a40758ac87ddf9b91b76a51daf98b24 (diff)
gnutar: pull missing `libintl` dependency on Darwin
Without the change `gnutar` fails the build as:

      "_libintl_setlocale", referenced from:
          _main in tar.o
      "_libintl_textdomain", referenced from:
          _main in tar.o
    ld: symbol(s) not found for architecture x86_64

https://hydra.nixos.org/build/228724258/nixlog/2/tail
https://hydra.nixos.org/build/228711328/nixlog/2/tail
Diffstat (limited to 'pkgs/tools/archivers')
-rw-r--r--pkgs/tools/archivers/gnutar/default.nix9
1 files changed, 7 insertions, 2 deletions
diff --git a/pkgs/tools/archivers/gnutar/default.nix b/pkgs/tools/archivers/gnutar/default.nix
index 738680a552a0d..331d977147b2f 100644
--- a/pkgs/tools/archivers/gnutar/default.nix
+++ b/pkgs/tools/archivers/gnutar/default.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv, fetchurl, autoreconfHook, acl }:
+{ lib, stdenv, fetchurl, autoreconfHook, acl, libintl }:
 
 # Note: this package is used for bootstrapping fetchurl, and thus
 # cannot use fetchpatch! All mutable patches (generated by GitHub or
@@ -31,7 +31,12 @@ stdenv.mkDerivation rec {
   outputs = [ "out" "info" ];
 
   nativeBuildInputs = lib.optional stdenv.isDarwin autoreconfHook;
-  buildInputs = lib.optional stdenv.isLinux acl;
+  # Add libintl on Darwin specifically as it fails to link (or skip)
+  # NLS on it's own:
+  #  "_libintl_textdomain", referenced from:
+  #    _main in tar.o
+  #  ld: symbol(s) not found for architecture x86_64
+  buildInputs = lib.optional stdenv.isLinux acl ++ lib.optional stdenv.isDarwin libintl;
 
   # May have some issues with root compilation because the bootstrap tool
   # cannot be used as a login shell for now.