From e1a5823f8d0660480d6a90fa83fabffe0beb0eae Mon Sep 17 00:00:00 2001 From: Aaron Jheng Date: Thu, 11 Jun 2026 17:31:36 +0800 Subject: [PATCH] diffoscope: fix hdf5 tools on Darwin --- pkgs/by-name/di/diffoscope/package.nix | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/pkgs/by-name/di/diffoscope/package.nix b/pkgs/by-name/di/diffoscope/package.nix index 20e30df4e5ea..6050432bcd0e 100644 --- a/pkgs/by-name/di/diffoscope/package.nix +++ b/pkgs/by-name/di/diffoscope/package.nix @@ -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