From 2c64e62786157b41787791eaa988019afce94bc1 Mon Sep 17 00:00:00 2001 From: PhiliPdB Date: Tue, 10 Mar 2026 17:12:37 +0100 Subject: [PATCH 1/2] rapidraw: 1.5.0 -> 1.5.1 Release notes: https://github.com/CyberTimon/RapidRAW/releases/tag/v1.5.1 Diff: https://github.com/CyberTimon/RapidRAW/compare/v1.5.0...v1.5.1 Also needed to fix darwin crash at startup due to onnxruntime not being in rpath Co-authored-by: Kieran Klukas --- pkgs/by-name/ra/rapidraw/package.nix | 42 +++++++++++++++++----------- 1 file changed, 26 insertions(+), 16 deletions(-) diff --git a/pkgs/by-name/ra/rapidraw/package.nix b/pkgs/by-name/ra/rapidraw/package.nix index b77102168e81..f886626690df 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.5.0"; + version = "1.5.1"; src = fetchFromGitHub { owner = "CyberTimon"; repo = "RapidRAW"; tag = "v${finalAttrs.version}"; - hash = "sha256-PzPw7TJQK6ojsdw8cypS/drtc/ec93IYGIjTEdpIraI="; + hash = "sha256-C6U3xU/rL+Og6DgJTnPESf+LPlm+svTNS5bSGhrn7dQ="; fetchSubmodules = true; # darwin/linux hash mismatch in rawler submodule @@ -62,7 +62,7 @@ rustPlatform.buildRustPackage (finalAttrs: { npmDeps = fetchNpmDeps { inherit (finalAttrs) src; - hash = "sha256-4PbNSM4BIMOpmPcys/Vt5gzy/Pu9L6rPcG0lGnTDvGo="; + hash = "sha256-YpM/EQ4eFqziwEpSXpBNEO8A5fCmjVtCrgr11YxLKxY="; }; nativeBuildInputs = [ @@ -136,22 +136,32 @@ rustPlatform.buildRustPackage (finalAttrs: { ORT_STRATEGY = "system"; }; - postInstall = lib.optionalString stdenv.hostPlatform.isLinux '' - # Patch the .desktop file to set the Categories field - sed -i '/^Categories=/c\Categories=Graphics;Photography' "$out/share/applications/RapidRAW.desktop" + postInstall = + lib.optionalString stdenv.hostPlatform.isLinux '' + # Patch the .desktop file to set the Categories field + sed -i '/^Categories=/c\Categories=Graphics;Photography' "$out/share/applications/RapidRAW.desktop" - # Ensure the resources directory exists before linking - mkdir -p $out/lib/RapidRAW/resources + # Ensure the resources directory exists before linking + mkdir -p $out/lib/RapidRAW/resources - # link the .so file - ln -sf ${onnxruntime}/lib/libonnxruntime.so $out/lib/RapidRAW/resources/libonnxruntime.so - ''; + # link the .so file + ln -sf ${onnxruntime}/lib/libonnxruntime.so $out/lib/RapidRAW/resources/libonnxruntime.so + '' + + lib.optionalString stdenv.hostPlatform.isDarwin '' + # Add rpath for onnxruntime so the binary can find libonnxruntime.dylib at runtime + install_name_tool -add_rpath "${onnxruntime}/lib" "$out/Applications/RapidRAW.app/Contents/MacOS/rapidraw" + ''; - postFixup = lib.optionalString stdenv.hostPlatform.isLinux '' - wrapGApp $out/bin/rapidraw \ - --prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath finalAttrs.buildInputs} \ - --set ORT_STRATEGY "system" - ''; + postFixup = + lib.optionalString stdenv.hostPlatform.isLinux '' + wrapGApp $out/bin/rapidraw \ + --prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath finalAttrs.buildInputs} \ + --set ORT_STRATEGY "system" + '' + + lib.optionalString stdenv.hostPlatform.isDarwin '' + wrapGApp "$out/Applications/RapidRAW.app/Contents/MacOS/rapidraw" \ + --set ORT_STRATEGY "system" + ''; meta = { description = "Blazingly-fast, non-destructive, and GPU-accelerated RAW image editor built with performance in mind"; From b04ffc41007f6db51c9d6beb28a1b49b0d327195 Mon Sep 17 00:00:00 2001 From: PhiliPdB Date: Tue, 10 Mar 2026 18:30:46 +0100 Subject: [PATCH 2/2] rapidraw: use nodejs_24 instead of nodejs_20 Brings it in line with the flatpak configuration upstream --- pkgs/by-name/ra/rapidraw/package.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/ra/rapidraw/package.nix b/pkgs/by-name/ra/rapidraw/package.nix index f886626690df..4e1a973357db 100644 --- a/pkgs/by-name/ra/rapidraw/package.nix +++ b/pkgs/by-name/ra/rapidraw/package.nix @@ -34,7 +34,7 @@ gvfs, libheif, glib-networking, - nodejs_20, + nodejs_24, npmHooks, cargo-tauri, writableTmpDirAsHomeHook, @@ -69,14 +69,14 @@ rustPlatform.buildRustPackage (finalAttrs: { pkg-config makeWrapper wrapGAppsHook4 - nodejs_20 + nodejs_24 npmHooks.npmConfigHook cargo-tauri.hook writableTmpDirAsHomeHook ]; buildInputs = [ - nodejs_20 + nodejs_24 glib-networking openssl gtk3