libtiff: don't propagate unnecessary build inputs (#292568)

This commit is contained in:
Philip Taron
2025-07-24 08:16:04 -07:00
committed by GitHub
3 changed files with 14 additions and 16 deletions
+2
View File
@@ -16,6 +16,7 @@
librsvg,
squashfuse,
xdg-utils-cxx,
xz, # for liblzma
zlib,
}:
stdenv.mkDerivation rec {
@@ -66,6 +67,7 @@ stdenv.mkDerivation rec {
libarchive
squashfuse
xdg-utils-cxx
xz
];
propagatedBuildInputs = [
+1
View File
@@ -41,6 +41,7 @@ stdenv.mkDerivation rec {
buildInputs = [
libtiff
proj
zlib
];
#hardeningDisable = [ "format" ];
+11 -16
View File
@@ -16,12 +16,10 @@
zlib,
zstd,
# Because lerc is C++ and static libraries don't track dependencies,
# that every downstream dependent of libtiff has to link with a C++
# compiler, or the C++ standard library won't be linked, resulting
# in undefined symbol errors. Without systematic support for this
# in build systems, fixing this would require modifying the build
# system of every libtiff user. Hopefully at some point build
# Because lerc is C++ and static libraries don't track dependencies, every downstream dependent of
# libtiff has to link with a C++ compiler, or the C++ standard library won't be linked, resulting
# in undefined symbol errors. Without systematic support for this in build systems, fixing this
# would require modifying the build system of every libtiff user. Hopefully at some point build
# systems will figure this out, and then we can enable this.
#
# See https://github.com/mesonbuild/meson/issues/14234
@@ -84,22 +82,16 @@ stdenv.mkDerivation (finalAttrs: {
];
buildInputs = [
zstd
]
++ lib.optionals withLerc [
lerc
];
# TODO: opengl support (bogus configure detection)
propagatedBuildInputs = [
libdeflate
libjpeg
# libwebp depends on us; this will cause infinite
# recursion otherwise
# libwebp depends on us; this will cause infinite recursion otherwise
(libwebp.override { tiffSupport = false; })
xz
zlib
zstd
]
++ lib.optionals withLerc [
lerc
];
cmakeFlags = [
@@ -109,6 +101,7 @@ stdenv.mkDerivation (finalAttrs: {
enableParallelBuilding = true;
doCheck = true;
# Avoid flakiness like https://gitlab.com/libtiff/libtiff/-/commit/94f6f7315b1
enableParallelChecking = false;
@@ -122,7 +115,9 @@ stdenv.mkDerivation (finalAttrs: {
openimageio
freeimage
;
inherit (python3Packages) pillow imread;
pkg-config = testers.hasPkgConfigModules {
package = finalAttrs.finalPackage;
};