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 buildBazelPackage: init 2018-02-20 20:39:49 +03:00
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 nix-buffer: make eshell-path-env be inherited 2018-02-15 17:30:59 -06:00
expand-response-params
fetchbower Merge remote-tracking branch 'upstream/master' into staging 2018-01-14 21:18:27 +02:00
fetchbzr treewide: Fetchers should use stdenvNoCC. 2018-01-10 11:18:44 -05:00
fetchcvs bsd: init netbsd & openbsd userland 2018-04-24 14:16:35 -05:00
fetchdarcs Merge remote-tracking branch 'upstream/master' into staging 2018-01-14 21:18:27 +02:00
fetchdocker
fetchegg treewide: Fetchers should use stdenvNoCC. 2018-01-10 11:18:44 -05:00
fetchfossil treewide: Fixed output fetch* derivations should use nativeBuildInputs 2018-01-09 20:14:46 -05:00
fetchgit nix-prefetch-git: fix handling of submodules with spaces 2018-05-04 23:16:51 +08:00
fetchgitlocal
fetchgx Merge remote-tracking branch 'upstream/master' into staging 2018-01-14 21:18:27 +02:00
fetchhg treewide: Fetchers should use stdenvNoCC. 2018-01-10 11:18:44 -05:00
fetchipfs treewide: Fixed output fetch* derivations should use nativeBuildInputs 2018-01-09 20:14:46 -05:00
fetchmavenartifact
fetchmtn treewide: Fetchers should use stdenvNoCC. 2018-01-10 11:18:44 -05:00
fetchnuget treewide: Fetchers should use stdenvNoCC. 2018-01-10 11:18:44 -05:00
fetchpatch fetchpatch: Add support for an arbitrary extra prefix 2018-01-18 12:19:49 -05:00
fetchrepoproject treewide: Fetchers should use stdenvNoCC. 2018-01-10 11:18:44 -05:00
fetchs3 fetchs3: allow to name the derivation output (#39823) 2018-05-03 11:08:25 +01:00
fetchsvn treewide: Fetchers should use stdenvNoCC. 2018-01-10 11:18:44 -05:00
fetchsvnrevision
fetchsvnssh treewide: Fetchers should use stdenvNoCC. 2018-01-10 11:18:44 -05:00
fetchurl Merge pull request #17757 from copumpkin/fetchurl-user-agent 2018-06-11 12:49:06 -04:00
fetchzip
icon-conv-tools
kernel kernel: Fix running kernels *with* modules 2018-04-12 15:43:53 +02:00
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 debBuild: install all packages at once to avoid dependency management 2018-02-19 16:07:40 +03:00
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 singularity: 2.4 -> 2.4.2 2018-03-12 15:13:31 +11:00
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 Cleanup 2018-02-27 19:59:26 +01:00
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