rapidraw: 1.3.2 -> 1.4.1 (#451032)
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
|
stdenv,
|
||||||
fetchFromGitHub,
|
fetchFromGitHub,
|
||||||
fetchNpmDeps,
|
fetchNpmDeps,
|
||||||
rustPlatform,
|
rustPlatform,
|
||||||
@@ -34,20 +35,21 @@
|
|||||||
|
|
||||||
rustPlatform.buildRustPackage (finalAttrs: {
|
rustPlatform.buildRustPackage (finalAttrs: {
|
||||||
pname = "rapidraw";
|
pname = "rapidraw";
|
||||||
version = "1.3.2";
|
version = "1.4.1";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "CyberTimon";
|
owner = "CyberTimon";
|
||||||
repo = "RapidRAW";
|
repo = "RapidRAW";
|
||||||
tag = "v${finalAttrs.version}";
|
tag = "v${finalAttrs.version}";
|
||||||
hash = "sha256-j9Mpg3o90/PdKlSpJEePcnXZoO2BfnGtJEielM/5/uQ=";
|
hash = "sha256-aDOE2VXStPx4POQoSxoQbLwdBmt3LuMPxSZ8ZshE7Fc=";
|
||||||
|
fetchSubmodules = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
cargoHash = "sha256-emwlK16NgeTYyQevWD4baHUxMP5xWJsKpQp/q5krAhQ=";
|
cargoHash = "sha256-+7CK2KxUMQ56CBVVb2esM+9ntJ7SzpVb2OmQ3mM5vNU=";
|
||||||
|
|
||||||
npmDeps = fetchNpmDeps {
|
npmDeps = fetchNpmDeps {
|
||||||
inherit (finalAttrs) src;
|
inherit (finalAttrs) src;
|
||||||
hash = "sha256-MULxH6gmHC58XdQe4ePvHcXP7/7fYNHgGHHltkODQ6w=";
|
hash = "sha256-QaPGXb26pDQLBJfYZoWt3jDeCdwameGkBvrTzhRMxYs=";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
@@ -64,11 +66,9 @@ rustPlatform.buildRustPackage (finalAttrs: {
|
|||||||
nodejs_20
|
nodejs_20
|
||||||
glib-networking
|
glib-networking
|
||||||
openssl
|
openssl
|
||||||
webkitgtk_4_1
|
|
||||||
gtk3
|
gtk3
|
||||||
glib
|
glib
|
||||||
gdk-pixbuf
|
gdk-pixbuf
|
||||||
libappindicator
|
|
||||||
cairo
|
cairo
|
||||||
pango
|
pango
|
||||||
xorg.libX11
|
xorg.libX11
|
||||||
@@ -90,6 +90,10 @@ rustPlatform.buildRustPackage (finalAttrs: {
|
|||||||
libheif
|
libheif
|
||||||
onnxruntime
|
onnxruntime
|
||||||
wrapGAppsHook4
|
wrapGAppsHook4
|
||||||
|
]
|
||||||
|
++ lib.optionals stdenv.hostPlatform.isLinux [
|
||||||
|
webkitgtk_4_1
|
||||||
|
libappindicator
|
||||||
];
|
];
|
||||||
|
|
||||||
cargoRoot = "src-tauri";
|
cargoRoot = "src-tauri";
|
||||||
@@ -101,7 +105,11 @@ rustPlatform.buildRustPackage (finalAttrs: {
|
|||||||
|
|
||||||
# Configure Tauri to use lowercase binary name
|
# Configure Tauri to use lowercase binary name
|
||||||
substituteInPlace src-tauri/tauri.conf.json \
|
substituteInPlace src-tauri/tauri.conf.json \
|
||||||
--replace ' "identifier": "com.rapidraw.app",' ' "identifier": "com.rapidraw.app", "mainBinaryName": "rapidraw",'
|
--replace-fail ' "identifier": "io.github.CyberTimon.RapidRAW",' ' "identifier": "io.github.CyberTimon.RapidRAW", "mainBinaryName": "rapidraw",'
|
||||||
|
|
||||||
|
# Disable downloading of ONNX runtime library this is correctly linked during postInstall
|
||||||
|
substituteInPlace src-tauri/build.rs \
|
||||||
|
--replace-fail 'if !is_valid' 'if false'
|
||||||
'';
|
'';
|
||||||
|
|
||||||
dontWrapGApps = true;
|
dontWrapGApps = true;
|
||||||
@@ -109,7 +117,7 @@ rustPlatform.buildRustPackage (finalAttrs: {
|
|||||||
# needs to be declared twice annoyingly
|
# needs to be declared twice annoyingly
|
||||||
ORT_STRATEGY = "system";
|
ORT_STRATEGY = "system";
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = lib.optionalString stdenv.hostPlatform.isLinux ''
|
||||||
# Patch the .desktop file to set the Categories field
|
# Patch the .desktop file to set the Categories field
|
||||||
sed -i '/^Categories=/c\Categories=Graphics;Photography' "$out/share/applications/RapidRAW.desktop"
|
sed -i '/^Categories=/c\Categories=Graphics;Photography' "$out/share/applications/RapidRAW.desktop"
|
||||||
|
|
||||||
@@ -123,7 +131,7 @@ rustPlatform.buildRustPackage (finalAttrs: {
|
|||||||
rm -rf $out/lib/RapidRAW/resources/libonnxruntime.dylib
|
rm -rf $out/lib/RapidRAW/resources/libonnxruntime.dylib
|
||||||
'';
|
'';
|
||||||
|
|
||||||
postFixup = ''
|
postFixup = lib.optionalString stdenv.hostPlatform.isLinux ''
|
||||||
wrapGApp $out/bin/rapidraw \
|
wrapGApp $out/bin/rapidraw \
|
||||||
--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath finalAttrs.buildInputs} \
|
--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath finalAttrs.buildInputs} \
|
||||||
--set ORT_STRATEGY "system" \
|
--set ORT_STRATEGY "system" \
|
||||||
|
|||||||
Reference in New Issue
Block a user