nixpkgs/pkgs/build-support
Orivej Desh fd97db43bc
pruneLibtoolFiles: init setup hook (#41819)
A .la file specifies linker flags to link with the library it describes. Its
"dependency_libs" field lists the libraries that this library depends upon.
This list often contains "-l" flags without corresponding "-L" flags. Many
packages in Nixpkgs deal with this in one of these ways:
- delete .la file [1]
- clear dependency_libs [2]
- add -L flags to dependency_libs [3]
- propagate dependencies [4]

Sometimes "dependency_libs" contain wrong "-L" flags pointing to the "dev"
output with headers rather than to the main output with libraries. They have to
be edited or deleted to reduce closure size [5].

Deleting .la files is often but not always safe [6].  Atomatically deleting as
many of them as possible is complex [7].  Deleting .la files that describe
shared rather than static libraries is probably safe; but clearing their
"dependency_libs" field achieves the same effect with less potential for
unintended consequences.  This is the approach that may be enabled for all
Nixpkgs.

[1] 2a79d296d3
[2] c83a530985
[3] 9e0dcf3bd9
[4] 01134e698f
[5] f6c73f1e37
[6] https://wiki.gentoo.org/wiki/Project:Quality_Assurance/Handling_Libtool_Archives
[7] https://github.com/gentoo/gentoo/blob/fb1f2435/eclass/ltprune.eclass
2018-06-11 18:11:02 +00:00
..
agda
bintools-wrapper Merge remote-tracking branch 'upstream/staging' into strictDeps 2018-05-14 23:33:03 -04:00
build-bazel-package
build-dotnet-package
build-fhs-userenv buildFHSUserEnv: change to root directory after chroot 2018-04-28 14:51:07 +01:00
build-setupcfg Revert "buildSetupcfg: Include unzip for zip sources." 2018-04-14 20:12:22 -04:00
buildenv
cc-wrapper clang_6: fix sanitizers under libstdc++ 2018-05-24 15:04:30 -07:00
docker dockerTools.pullImage: expose image* attributes (#41366) 2018-06-03 22:58:23 +02:00
dotnetbuildhelpers
dotnetenv
emacs
expand-response-params
fetchbower
fetchbzr
fetchcvs bsd: init netbsd & openbsd userland 2018-04-24 14:16:35 -05:00
fetchdarcs
fetchdocker
fetchegg
fetchfossil
fetchgit nix-prefetch-git: fix handling of submodules with spaces 2018-05-04 23:16:51 +08:00
fetchgitlocal
fetchgx
fetchhg
fetchipfs
fetchmavenartifact
fetchmtn
fetchnuget
fetchpatch
fetchrepoproject
fetchs3 fetchs3: allow to name the derivation output (#39823) 2018-05-03 11:08:25 +01:00
fetchsvn
fetchsvnrevision
fetchsvnssh
fetchurl Merge pull request #17757 from copumpkin/fetchurl-user-agent 2018-06-11 12:49:06 -04:00
fetchzip
icon-conv-tools
kernel
libredirect
make-desktopitem
make-startupitem
make-symlinks
mkshell
mono-dll-fixer
nix-prefetch-github nix-prefetch-github: init -> 1.3 2018-05-22 20:55:07 +02:00
nuke-references
ocaml
release
remove-references-to
rust Merge branch 'master' into staging 2018-05-20 13:20:53 +02:00
setup-hooks pruneLibtoolFiles: init setup hook (#41819) 2018-06-11 18:11:02 +00:00
singularity-tools
src-only
substitute
substitute-files
templaterpm
upstream-updater
vm runInLinuxVM: fix ext4 and crc32c-intel interactions 2018-05-03 20:08:48 -03:00
vsenv
wrapper-common {bintools,cc}-wrapper: Factor out role accumulation logic 2018-05-07 15:10:45 -04:00
build-maven.nix
build-pecl.nix
closure-info.nix
dhall-to-nix.nix
plugins.nix
replace-dependency.nix
setup-systemd-units.nix
source-from-head-fun.nix
trivial-builders.nix requireFile: Use stdenvNoCC 2018-05-21 19:26:36 -04:00