diff --git a/pkgs/by-name/ra/rapidraw/package.nix b/pkgs/by-name/ra/rapidraw/package.nix index 81bd053a8391..95e27c462fe1 100644 --- a/pkgs/by-name/ra/rapidraw/package.nix +++ b/pkgs/by-name/ra/rapidraw/package.nix @@ -42,13 +42,13 @@ rustPlatform.buildRustPackage (finalAttrs: { pname = "rapidraw"; - version = "1.4.5"; + version = "1.4.11"; src = fetchFromGitHub { owner = "CyberTimon"; repo = "RapidRAW"; tag = "v${finalAttrs.version}"; - hash = "sha256-WG9Dlo7yRt+QZGA5112+BX3HHhjV0XW5nrj7PUORUFE="; + hash = "sha256-Jd/t3PWvUaQuTHqd4A4vqAfzR2QpZ/j1352gLyuqRxQ="; fetchSubmodules = true; # darwin/linux hash mismatch in rawler submodule @@ -58,11 +58,11 @@ rustPlatform.buildRustPackage (finalAttrs: { ''; }; - cargoHash = "sha256-6oI88cvlCR6TBiAAUka+Q8bkoYyTXvpMDNMfwlPjtIU="; + cargoHash = "sha256-ijyrq2BwNeJM8eM6yc5jmCicpLndhtKVlwHviMwpFS4="; npmDeps = fetchNpmDeps { inherit (finalAttrs) src; - hash = "sha256-w806JHqy2ZLFcfYVm09VKnLd7BpLI1houfMYbY3sHe0="; + hash = "sha256-jenSEANarab/oQnC80NoM1jWmvdeXF3bJ9I/vOGcBb0="; }; nativeBuildInputs = [ @@ -125,10 +125,16 @@ 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; - # 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 @@ -139,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 = {