From cb1c327a34f36426e3f51d7a25ccdddeddaa461e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20K=C3=B6gler?= Date: Thu, 28 May 2026 15:54:40 +0200 Subject: [PATCH] rapidraw: remove darwin onnxruntime workarounds The rpath of onnxruntime was fixed in 43348a3ea307 so these workarounds using install_name_tool and DYLD_* variables are no longer needed. --- pkgs/by-name/ra/rapidraw/package.nix | 7 ------- 1 file changed, 7 deletions(-) diff --git a/pkgs/by-name/ra/rapidraw/package.nix b/pkgs/by-name/ra/rapidraw/package.nix index 256017b9acaa..7ea1c09446cb 100644 --- a/pkgs/by-name/ra/rapidraw/package.nix +++ b/pkgs/by-name/ra/rapidraw/package.nix @@ -118,11 +118,6 @@ rustPlatform.buildRustPackage (finalAttrs: { --replace-fail 'if !is_valid' 'if false' ''; - # Fix dyld error about onnxruntime not being loaded on darwin during cargo test - preCheck = lib.optionalString stdenv.hostPlatform.isDarwin '' - export DYLD_LIBRARY_PATH="${onnxruntime}/lib:$DYLD_LIBRARY_PATH" - ''; - dontWrapGApps = true; env = { @@ -141,8 +136,6 @@ rustPlatform.buildRustPackage (finalAttrs: { ln -sf ${onnxruntime}/lib/libonnxruntime.so $out/lib/RapidRAW/resources/libonnxruntime.so '' + lib.optionalString stdenv.hostPlatform.isDarwin '' - # The binary links against @rpath/libonnxruntime.*.dylib but has no LC_RPATH entries - install_name_tool -add_rpath "${onnxruntime}/lib" "$out/Applications/RapidRAW.app/Contents/MacOS/rapidraw" # The app also dlopen()s libonnxruntime.dylib at a hardcoded path inside the bundle mkdir -p "$out/Applications/RapidRAW.app/Contents/Resources/resources" ln -sf ${onnxruntime}/lib/libonnxruntime.dylib "$out/Applications/RapidRAW.app/Contents/Resources/resources/libonnxruntime.dylib"