From 9bb5ec2a32e46077051c341f0b1d6a1b8a90fe3d Mon Sep 17 00:00:00 2001 From: Yiyu Zhou Date: Tue, 24 Mar 2026 15:51:28 -0700 Subject: [PATCH 1/3] gnutar: enable strictDeps --- pkgs/tools/archivers/gnutar/default.nix | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/pkgs/tools/archivers/gnutar/default.nix b/pkgs/tools/archivers/gnutar/default.nix index c7e65d9ce7f9..50742065796a 100644 --- a/pkgs/tools/archivers/gnutar/default.nix +++ b/pkgs/tools/archivers/gnutar/default.nix @@ -40,20 +40,16 @@ stdenv.mkDerivation rec { "info" ]; - nativeBuildInputs = [ autoreconfHook ]; + strictDeps = true; + + nativeBuildInputs = [ autoreconfHook ] ++ lib.optional stdenv.hostPlatform.isCygwin gettext; # 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 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; + buildInputs = lib.optional aclSupport acl ++ lib.optional stdenv.hostPlatform.isDarwin libintl; # May have some issues with root compilation because the bootstrap tool # cannot be used as a login shell for now. From 0b45e7f961d19b0e617bc7349c81debe852b8c2f Mon Sep 17 00:00:00 2001 From: Yiyu Zhou Date: Tue, 24 Mar 2026 16:12:25 -0700 Subject: [PATCH 2/3] gnutar: cleanup --- pkgs/tools/archivers/gnutar/default.nix | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/pkgs/tools/archivers/gnutar/default.nix b/pkgs/tools/archivers/gnutar/default.nix index 50742065796a..51344245c45f 100644 --- a/pkgs/tools/archivers/gnutar/default.nix +++ b/pkgs/tools/archivers/gnutar/default.nix @@ -3,11 +3,11 @@ stdenv, fetchurl, autoreconfHook, - updateAutotoolsGnuConfigScriptsHook, libintl, gettext, aclSupport ? lib.meta.availableOn stdenv.hostPlatform acl, acl, + versionCheckHook, }: # Note: this package is used for bootstrapping fetchurl, and thus @@ -15,12 +15,12 @@ # cgit) that are needed here should be included directly in Nixpkgs as # files. -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "gnutar"; version = "1.35"; src = fetchurl { - url = "mirror://gnu/tar/tar-${version}.tar.xz"; + url = "mirror://gnu/tar/tar-${finalAttrs.version}.tar.xz"; sha256 = "sha256-TWL/NzQux67XSFNTI5MMfPlKz3HDWRiCsmp+pQ8+3BY="; }; @@ -32,7 +32,7 @@ stdenv.mkDerivation rec { # which is not safe on darwin. # see http://article.gmane.org/gmane.os.macosx.fink.devel/21882 postPatch = lib.optionalString stdenv.hostPlatform.isDarwin '' - substituteInPlace src/system.c --replace '_(' 'N_(' + substituteInPlace src/system.c --replace-fail '_(' 'N_(' ''; outputs = [ @@ -57,11 +57,12 @@ stdenv.mkDerivation rec { stdenv.hostPlatform.system == "armv7l-linux" || stdenv.hostPlatform.isSunOS ) "1"; - doCheck = false; # fails - doInstallCheck = false; # fails + doCheck = true; + doInstallCheck = true; + nativeInstallCheckInputs = [ versionCheckHook ]; meta = { - description = "GNU implementation of the `tar' archiver"; + description = "GNU implementation of the `tar` archiver"; longDescription = '' The Tar program provides the ability to create tar archives, as well as various other kinds of manipulation. For example, you @@ -77,13 +78,10 @@ stdenv.mkDerivation rec { archives). ''; homepage = "https://www.gnu.org/software/tar/"; - license = lib.licenses.gpl3Plus; - - maintainers = with lib.maintainers; [ RossComputerGuy ]; mainProgram = "tar"; + maintainers = with lib.maintainers; [ RossComputerGuy ]; platforms = lib.platforms.all; - priority = 10; }; -} +}) From 0fbb9827f2edcaa368a8717b7d89f4b59c6c9933 Mon Sep 17 00:00:00 2001 From: Yiyu Zhou Date: Wed, 25 Mar 2026 00:25:37 -0700 Subject: [PATCH 3/3] gnutar: migrate to by-name --- ci/OWNERS | 2 +- pkgs/{tools/archivers => by-name/gn}/gnutar/link-libiconv.patch | 0 .../gnutar/default.nix => by-name/gn/gnutar/package.nix} | 0 pkgs/stdenv/linux/default.nix | 1 - pkgs/top-level/all-packages.nix | 2 -- 5 files changed, 1 insertion(+), 4 deletions(-) rename pkgs/{tools/archivers => by-name/gn}/gnutar/link-libiconv.patch (100%) rename pkgs/{tools/archivers/gnutar/default.nix => by-name/gn/gnutar/package.nix} (100%) diff --git a/ci/OWNERS b/ci/OWNERS index 695c91aa1af0..58b55b0c8efc 100644 --- a/ci/OWNERS +++ b/ci/OWNERS @@ -477,7 +477,7 @@ pkgs/by-name/lx/lxc* @adamcstephens /pkgs/desktops/expidus @RossComputerGuy # GNU Tar & Zip -/pkgs/tools/archivers/gnutar @RossComputerGuy +/pkgs/by-name/gn/gnutar @RossComputerGuy /pkgs/by-name/zi/zip @RossComputerGuy # SELinux diff --git a/pkgs/tools/archivers/gnutar/link-libiconv.patch b/pkgs/by-name/gn/gnutar/link-libiconv.patch similarity index 100% rename from pkgs/tools/archivers/gnutar/link-libiconv.patch rename to pkgs/by-name/gn/gnutar/link-libiconv.patch diff --git a/pkgs/tools/archivers/gnutar/default.nix b/pkgs/by-name/gn/gnutar/package.nix similarity index 100% rename from pkgs/tools/archivers/gnutar/default.nix rename to pkgs/by-name/gn/gnutar/package.nix diff --git a/pkgs/stdenv/linux/default.nix b/pkgs/stdenv/linux/default.nix index a6115d05440c..e2c2131eb762 100644 --- a/pkgs/stdenv/linux/default.nix +++ b/pkgs/stdenv/linux/default.nix @@ -847,7 +847,6 @@ in findutils gawk gnused - gnutar gnugrep gnupatch patchelf diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 8a773dbf6afb..93431e6f67be 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -2440,8 +2440,6 @@ with pkgs; gnused = callPackage ../tools/text/gnused { }; - gnutar = callPackage ../tools/archivers/gnutar { }; - inherit (callPackage ../development/tools/godot { }) godot3 godot3-export-templates