diff --git a/doc/stdenv.xml b/doc/stdenv.xml index 564471bbbbc..d3ee5164bc1 100644 --- a/doc/stdenv.xml +++ b/doc/stdenv.xml @@ -1662,6 +1662,18 @@ installTargets = "install-bin install-doc"; + + + dontPruneLibtoolFiles + + + + If set, libtool .la files associated with shared + libraries won't have their dependency_libs field + cleared. + + + forceShare diff --git a/pkgs/applications/misc/digitalbitbox/default.nix b/pkgs/applications/misc/digitalbitbox/default.nix index 939e2e9fc16..0272cfd52c0 100644 --- a/pkgs/applications/misc/digitalbitbox/default.nix +++ b/pkgs/applications/misc/digitalbitbox/default.nix @@ -68,8 +68,6 @@ in stdenv.mkDerivation rec { ]; buildInputs = [ - # TODO: remove libcap when pruneLibtoolFiles applies to pulseaudio. - libcap libevent libtool udev diff --git a/pkgs/build-support/setup-hooks/prune-libtool-files.sh b/pkgs/build-support/setup-hooks/prune-libtool-files.sh index d75812e05b6..5d7432e8f09 100644 --- a/pkgs/build-support/setup-hooks/prune-libtool-files.sh +++ b/pkgs/build-support/setup-hooks/prune-libtool-files.sh @@ -8,7 +8,7 @@ fixupOutputHooks+=(_pruneLibtoolFiles) _pruneLibtoolFiles() { - if [ "$dontPruneLibtoolFiles" ]; then + if [ "$dontPruneLibtoolFiles" ] || [ ! -e "$prefix" ]; then return fi @@ -16,7 +16,7 @@ _pruneLibtoolFiles() { # the "old_library" field for static libraries. We are processing only # those .la files that do not describe static libraries. find "$prefix" -type f -name '*.la' \ - -exec grep -q '^# Generated by libtool' {} \; \ + -exec grep -q '^# Generated by .*libtool' {} \; \ -exec grep -q "^old_library=''" {} \; \ -exec sed -i {} -e "/^dependency_libs='[^']/ c dependency_libs='' #pruned" \; } diff --git a/pkgs/development/libraries/SDL2/default.nix b/pkgs/development/libraries/SDL2/default.nix index b31a0703a03..d82b25fb892 100644 --- a/pkgs/development/libraries/SDL2/default.nix +++ b/pkgs/development/libraries/SDL2/default.nix @@ -1,4 +1,4 @@ -{ stdenv, config, libGLSupported, fetchurl, pkgconfig, pruneLibtoolFiles +{ stdenv, config, libGLSupported, fetchurl, pkgconfig , openglSupport ? libGLSupported, libGL , alsaSupport ? stdenv.isLinux, alsaLib , x11Support ? !stdenv.isCygwin, libX11, xorgproto, libICE, libXi, libXScrnSaver, libXcursor, libXinerama, libXext, libXxf86vm, libXrandr @@ -33,7 +33,7 @@ stdenv.mkDerivation rec { patches = [ ./find-headers.patch ]; - nativeBuildInputs = [ pkgconfig pruneLibtoolFiles ]; + nativeBuildInputs = [ pkgconfig ]; propagatedBuildInputs = dlopenPropagatedBuildInputs; diff --git a/pkgs/development/libraries/libheif/default.nix b/pkgs/development/libraries/libheif/default.nix index cdc03c01a02..25cee4ef8da 100644 --- a/pkgs/development/libraries/libheif/default.nix +++ b/pkgs/development/libraries/libheif/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub, autoreconfHook, pkgconfig, pruneLibtoolFiles, libde265, x265, libpng, libjpeg }: +{ stdenv, fetchFromGitHub, autoreconfHook, pkgconfig, libde265, x265, libpng, libjpeg }: stdenv.mkDerivation rec { version = "1.3.2"; @@ -11,7 +11,7 @@ stdenv.mkDerivation rec { sha256 = "0hk8mzig2kp5f94j4jwqxzjrm7ffk16ffvxl92rf0afsh6vgnz7w"; }; - nativeBuildInputs = [ autoreconfHook pkgconfig pruneLibtoolFiles ]; + nativeBuildInputs = [ autoreconfHook pkgconfig ]; buildInputs = [ libde265 x265 libpng libjpeg ]; enableParallelBuilding = true; diff --git a/pkgs/development/libraries/webkitgtk/2.4.nix b/pkgs/development/libraries/webkitgtk/2.4.nix index 9030149fc8a..04758ace7fa 100644 --- a/pkgs/development/libraries/webkitgtk/2.4.nix +++ b/pkgs/development/libraries/webkitgtk/2.4.nix @@ -1,5 +1,5 @@ { stdenv, fetchurl, fetchpatch, perl, python, ruby, bison, gperf, flex -, pkgconfig, which, gettext, gobject-introspection, pruneLibtoolFiles +, pkgconfig, which, gettext, gobject-introspection , gtk2, gtk3, wayland, libwebp, enchant, sqlite , libxml2, libsoup, libsecret, libxslt, harfbuzz, xorg , gst-plugins-base, libobjc @@ -86,7 +86,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ perl python ruby bison gperf flex - pkgconfig which gettext gobject-introspection pruneLibtoolFiles + pkgconfig which gettext gobject-introspection ]; buildInputs = [ diff --git a/pkgs/stdenv/generic/default.nix b/pkgs/stdenv/generic/default.nix index fccab8f60ff..04117de3269 100644 --- a/pkgs/stdenv/generic/default.nix +++ b/pkgs/stdenv/generic/default.nix @@ -47,6 +47,7 @@ let ../../build-support/setup-hooks/compress-man-pages.sh ../../build-support/setup-hooks/strip.sh ../../build-support/setup-hooks/patch-shebangs.sh + ../../build-support/setup-hooks/prune-libtool-files.sh ] # FIXME this on Darwin; see # https://github.com/NixOS/nixpkgs/commit/94d164dd7#commitcomment-22030369