kdePackages.kdeconnect-kde: hardcode sshfs path

Fixes #311236
This commit is contained in:
K900 2024-05-13 08:26:18 +03:00
parent 087a12fa12
commit e526629d75
2 changed files with 29 additions and 0 deletions

@ -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];

@ -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")))