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 <me@dunkirk.sh>
This commit is contained in:
PhiliPdB
2026-03-16 20:12:31 +01:00
co-authored by Kieran Klukas
parent d981af9288
commit 2c64e62786
+26 -16
View File
@@ -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";