rapidraw: general cleanup

- Move ORT_STRATEGY into `env`.
- ORT_DYLIB_PATH doesn't need to be set as it is not read.
- There is no dylib in resources/, no need to remove.
This commit is contained in:
PhiliPdB
2026-02-02 19:40:26 +01:00
parent 6dc078a6f5
commit a08b100ead
+4 -7
View File
@@ -132,8 +132,9 @@ rustPlatform.buildRustPackage (finalAttrs: {
dontWrapGApps = true;
# needs to be declared twice annoyingly
ORT_STRATEGY = "system";
env = {
ORT_STRATEGY = "system";
};
postInstall = lib.optionalString stdenv.hostPlatform.isLinux ''
# Patch the .desktop file to set the Categories field
@@ -144,16 +145,12 @@ rustPlatform.buildRustPackage (finalAttrs: {
# link the .so file
ln -sf ${onnxruntime}/lib/libonnxruntime.so $out/lib/RapidRAW/resources/libonnxruntime.so
# remove the .dylib file
rm -rf $out/lib/RapidRAW/resources/libonnxruntime.dylib
'';
postFixup = lib.optionalString stdenv.hostPlatform.isLinux ''
wrapGApp $out/bin/rapidraw \
--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath finalAttrs.buildInputs} \
--set ORT_STRATEGY "system" \
--set ORT_DYLIB_PATH "${onnxruntime}/lib/libonnxruntime.so"
--set ORT_STRATEGY "system"
'';
meta = {