From 6b2e5b947405fce1033199dfe3b4e754b14e4c35 Mon Sep 17 00:00:00 2001 From: Ivan Mincik Date: Mon, 26 Feb 2024 21:24:53 +0100 Subject: [PATCH] libtiff: don't propagate unnecessary build inputs --- pkgs/by-name/li/libtiff/package.nix | 27 +++++++++++---------------- 1 file changed, 11 insertions(+), 16 deletions(-) diff --git a/pkgs/by-name/li/libtiff/package.nix b/pkgs/by-name/li/libtiff/package.nix index c73dfa2d0c94..33bfd037d577 100644 --- a/pkgs/by-name/li/libtiff/package.nix +++ b/pkgs/by-name/li/libtiff/package.nix @@ -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; };