From c5b561dcc4ae992f56dcbbaaf5838098913d2929 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sun, 17 Nov 2024 12:33:03 +0100 Subject: [PATCH] [Backport release-24.11] rustdesk-flutter: fix build (#356694) rustdesk-flutter: fix build (#356450) (cherry picked from commit 02d0071fa9fed7d9b240ef86824edba00c1ded1d) Co-authored-by: Bot_wxt1221 <3264117476@qq.com> --- pkgs/by-name/ru/rustdesk-flutter/package.nix | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/ru/rustdesk-flutter/package.nix b/pkgs/by-name/ru/rustdesk-flutter/package.nix index 3ff05d808baa..0c6ecb9a6bd3 100644 --- a/pkgs/by-name/ru/rustdesk-flutter/package.nix +++ b/pkgs/by-name/ru/rustdesk-flutter/package.nix @@ -163,8 +163,11 @@ flutter319.buildFlutterApplication rec { patches = [ ./make-build-reproducible.patch ]; postPatch = '' - substituteInPlace $cargoDepsCopy/libappindicator-sys-*/src/lib.rs \ - --replace-fail "libayatana-appindicator3.so.1" "${lib.getLib libayatana-appindicator}/lib/libayatana-appindicator3.so.1" + if [ $cargoDepsCopy ]; then # That will be inherited to buildDartPackage and it doesn't have cargoDepsCopy + substituteInPlace $cargoDepsCopy/libappindicator-sys-*/src/lib.rs \ + --replace-fail "libayatana-appindicator3.so.1" "${lib.getLib libayatana-appindicator}/lib/libayatana-appindicator3.so.1" + fi + substituteInPlace ../Cargo.toml --replace-fail ", \"staticlib\", \"rlib\"" "" # The supplied Cargo.lock doesn't work with our fetcher so copy over the fixed version cp ${./Cargo.lock} ../Cargo.lock