The unit check failed with the library present: in nativeBuildInputs is a nix wrapper that sets LD_LIBRARY_PATH itself, so an export from the builder script is overwritten before the tests run. TURBOJPEG_PATH is read first by jpeg._load_library, no wrapper touches it, and the package's console scripts now set it too.