build: point TURBOJPEG_PATH at lib.getLib, not the package's default output

The default output of libjpeg-turbo in this nixpkgs is the tools (-bin), which has
no lib/ at all, so the check failed with 'cannot load libjpeg-turbo from
.../-bin/lib/libturbojpeg.so'. lib.getLib selects the output that actually holds
the shared library.
This commit is contained in:
Hermenix committed 2026-10-11 23:04:17 +00:00
1 parent a417a6919d
commit b2bc84602a
2 files changed
+5 -2

No files matched your search

+1 -1
View File
@@ -77,7 +77,7 @@ runCommand "hhstream-unit"
# exporting it here had no effect and the suite failed with the library plainly
# present on the machine. `jpeg._load_library` reads this variable first.
export LD_LIBRARY_PATH=${libjpeg_turbo}/lib
export TURBOJPEG_PATH=${libjpeg_turbo}/lib/libturbojpeg.so
export TURBOJPEG_PATH=${lib.getLib libjpeg_turbo}/lib/libturbojpeg.so
export PYTHONDONTWRITEBYTECODE=1
export HOME=$PWD
python3 -c 'import hhstream; print("testing hhstream", hhstream.__version__, "from", hhstream.__file__)'
+4 -1
View File
@@ -38,7 +38,10 @@ python3.pkgs.buildPythonApplication {
# one that actually decides, and `jpeg._load_library` checks it first.
makeWrapperArgs = [
"--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ libjpeg_turbo ]}"
"--set TURBOJPEG_PATH ${libjpeg_turbo}/lib/libturbojpeg.so"
# `lib.getLib`, not the bare package: the default output of libjpeg-turbo in
# this nixpkgs is the *tools* (`-bin`), which has no `lib/` at all -- pointing
# at it produced "cannot load libjpeg-turbo from .../-bin/lib/libturbojpeg.so".
"--set TURBOJPEG_PATH ${lib.getLib libjpeg_turbo}/lib/libturbojpeg.so"
];
# Unit tests are wired up in the flake's `checks` so they can run without