[Backport release-26.05] diffoscope: fix hdf5 tools on Darwin (#533719)

This commit is contained in:
Michael Daniels 2026-06-20 21:23:25 +00:00 committed by GitHub
commit d06796c416
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -273,6 +273,20 @@ python.pkgs.buildPythonApplication rec {
"-vv"
];
preCheck = lib.optionalString (enableBloat && stdenv.hostPlatform.isDarwin) ''
# h5dump is in hdf5's bin output, but its dylibs are in the out output.
export DYLD_LIBRARY_PATH="${lib.makeLibraryPath [ hdf5 ]}''${DYLD_LIBRARY_PATH:+:''${DYLD_LIBRARY_PATH}}"
'';
makeWrapperArgs = lib.optionals enableBloat (
[
"--prefix PATH : ${lib.makeBinPath [ hdf5 ]}"
]
++ lib.optionals stdenv.hostPlatform.isDarwin [
"--prefix DYLD_LIBRARY_PATH : ${lib.makeLibraryPath [ hdf5 ]}"
]
);
postInstall = ''
make -C doc
installManPage doc/diffoscope.1