about summary refs log tree commit diff
path: root/pkgs/kde
diff options
context:
space:
mode:
authorK900 <me@0upti.me>2024-05-13 08:26:18 +0300
committerK900 <me@0upti.me>2024-05-13 08:26:18 +0300
commite526629d759949faea584911171a4e1c71f9cc60 (patch)
tree43999739d7962920bd3ef8445e4ec0fadbe5ead7 /pkgs/kde
parent087a12fa121aeec138d59890cce3ab59549e8f4e (diff)
kdePackages.kdeconnect-kde: hardcode sshfs path
Fixes #311236
Diffstat (limited to 'pkgs/kde')
-rw-r--r--pkgs/kde/gear/kdeconnect-kde/default.nix16
-rw-r--r--pkgs/kde/gear/kdeconnect-kde/hardcode-sshfs-path.patch13
2 files changed, 29 insertions, 0 deletions
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")))