From e526629d759949faea584911171a4e1c71f9cc60 Mon Sep 17 00:00:00 2001 From: K900 Date: Mon, 13 May 2024 08:26:18 +0300 Subject: kdePackages.kdeconnect-kde: hardcode sshfs path Fixes #311236 --- pkgs/kde/gear/kdeconnect-kde/default.nix | 16 ++++++++++++++++ pkgs/kde/gear/kdeconnect-kde/hardcode-sshfs-path.patch | 13 +++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 pkgs/kde/gear/kdeconnect-kde/hardcode-sshfs-path.patch (limited to 'pkgs/kde') diff --git a/pkgs/kde/gear/kdeconnect-kde/default.nix b/pkgs/kde/gear/kdeconnect-kde/default.nix index fd8868cf41c2a..c8575ee51ea69 100644 --- a/pkgs/kde/gear/kdeconnect-kde/default.nix +++ b/pkgs/kde/gear/kdeconnect-kde/default.nix @@ -1,5 +1,8 @@ { + lib, mkKdeDerivation, + substituteAll, + sshfs, qtconnectivity, qtmultimedia, qtwayland, @@ -11,6 +14,19 @@ mkKdeDerivation { pname = "kdeconnect-kde"; + patches = [ + (substituteAll { + src = ./hardcode-sshfs-path.patch; + sshfs = lib.getExe sshfs; + }) + ]; + + # Hardcoded as a QString, which is UTF-16 so Nix can't pick it up automatically + postFixup = '' + mkdir -p $out/nix-support + echo "${sshfs}" > $out/nix-support/depends + ''; + extraNativeBuildInputs = [pkg-config]; extraBuildInputs = [qtconnectivity qtmultimedia qtwayland wayland wayland-protocols libfakekey]; diff --git a/pkgs/kde/gear/kdeconnect-kde/hardcode-sshfs-path.patch b/pkgs/kde/gear/kdeconnect-kde/hardcode-sshfs-path.patch new file mode 100644 index 0000000000000..df78f60fcf903 --- /dev/null +++ b/pkgs/kde/gear/kdeconnect-kde/hardcode-sshfs-path.patch @@ -0,0 +1,13 @@ +diff --git a/plugins/sftp/mounter.cpp b/plugins/sftp/mounter.cpp +index 29e94f3b..c71e552f 100644 +--- a/plugins/sftp/mounter.cpp ++++ b/plugins/sftp/mounter.cpp +@@ -94,7 +94,7 @@ void Mounter::onPacketReceived(const NetworkPacket &np) + + QDir().mkpath(m_mountPoint); + +- const QString program = QStringLiteral("sshfs"); ++ const QString program = QStringLiteral("@sshfs@"); + + QString path; + if (np.has(QStringLiteral("multiPaths"))) -- cgit 1.4.1