about summary refs log tree commit diff
path: root/pkgs/development/tools/misc/libtool
diff options
context:
space:
mode:
authorSergei Trofimovich <slyich@gmail.com>2023-01-10 22:28:37 +0000
committerSergei Trofimovich <slyich@gmail.com>2023-01-13 22:19:20 +0000
commit6becbd39707fbf8306b35af1828893eec0d03646 (patch)
tree2287922af75b57d2e061c4765a3a16160f5533b4 /pkgs/development/tools/misc/libtool
parent2add5f003afd049a7c60ea33bab63d1c9d5103cf (diff)
libtool: drop unused auto* dependencies
Autoreconf was initially added in e44dd84664f ("libtool2: macOS 11
support") for configure patches. The patches were removed since 2.4.7
release. Let's drop these dependencies to make boostrap tree leaner.

The diff of bootstrap tree before and after the change:

    $ nix-store --query --graph $(nix-instantiate -A stdenv) |
        fgrep ' -> ' | awk '{print $3}' | sort -u |
        sed 's/"[0-9a-z]\{32\}-/"/g' | sort > before

    $ nix-store --query --graph $(nix-instantiate -A stdenv) |
        fgrep ' -> ' | awk '{print $3}' | sort -u |
        sed 's/"[0-9a-z]\{32\}-/"/g' | sort > after

    $ diff -U0 before after

    --- before
    +++ after
    @@ -64,2 +63,0 @@
    -"help2man-1.49.2.drv"
    -"help2man-1.49.2.drv"
    @@ -77 +74,0 @@
    -"libxcrypt-4.4.33.drv"
    @@ -88,4 +84,0 @@
    -"perl-5.36.0.drv"
    -"perl-5.36.0.drv"
    -"perl5.36.0-gettext-1.07.drv"
    -"perl5.36.0-gettext-1.07.drv"

This removes 2 of 3 builds of `perl` and `help2man` dependencies.

Co-authored-by: Adam Joseph <54836058+amjoseph-nixpkgs@users.noreply.github.com>
Diffstat (limited to 'pkgs/development/tools/misc/libtool')
-rw-r--r--pkgs/development/tools/misc/libtool/libtool2.nix22
1 files changed, 8 insertions, 14 deletions
diff --git a/pkgs/development/tools/misc/libtool/libtool2.nix b/pkgs/development/tools/misc/libtool/libtool2.nix
index 8625a421af64f..a2c58010eff7c 100644
--- a/pkgs/development/tools/misc/libtool/libtool2.nix
+++ b/pkgs/development/tools/misc/libtool/libtool2.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv, fetchurl, fetchpatch, autoconf, automake, m4, perl, help2man
+{ lib, stdenv, fetchurl, fetchpatch, m4
 , runtimeShell
 , file
 }:
@@ -23,28 +23,22 @@ stdenv.mkDerivation rec {
   #   https://lists.gnu.org/archive/html/autotools-announce/2022-03/msg00000.html
   FILECMD = "${file}/bin/file";
 
-  # Normally we'd use autoreconfHook, but that includes libtoolize.
-  postPatch = ''
-    aclocal -I m4
-    automake
-    autoconf
-
-    pushd libltdl
-    aclocal -I ../m4
-    automake
-    autoconf
-    popd
-  '' +
+  postPatch =
   # libtool commit da2e352735722917bf0786284411262195a6a3f6 changed
   # the shebang from `/bin/sh` (which is a special sandbox exception)
   # to `/usr/bin/env sh`, meaning that we now need to patch shebangs
   # in libtoolize.in:
   ''
     substituteInPlace libtoolize.in       --replace '#! /usr/bin/env sh' '#!${runtimeShell}'
+    # avoid help2man run after 'libtoolize.in' update
+    touch doc/libtoolize.1
   '';
 
   strictDeps = true;
-  nativeBuildInputs = [ autoconf automake help2man m4 perl ];
+  # As libtool is an early bootstrap dependency try hard not to
+  # add autoconf and automake or help2man dependencies here. That way we can
+  # avoid pulling in perl and get away with just an `m4` depend.
+  nativeBuildInputs = [ m4 file ];
   propagatedBuildInputs = [ m4 file ];
 
   # Don't fixup "#! /bin/sh" in Libtool, otherwise it will use the