kde5.kio: fix Samba detection
This commit is contained in:
parent
53588bac96
commit
ba443da270
|
@ -74,7 +74,7 @@ let
|
||||||
kidletime = callPackage ./kidletime.nix {};
|
kidletime = callPackage ./kidletime.nix {};
|
||||||
kimageformats = callPackage ./kimageformats.nix {};
|
kimageformats = callPackage ./kimageformats.nix {};
|
||||||
kinit = callPackage ./kinit {};
|
kinit = callPackage ./kinit {};
|
||||||
kio = callPackage ./kio.nix {};
|
kio = callPackage ./kio {};
|
||||||
kitemmodels = callPackage ./kitemmodels.nix {};
|
kitemmodels = callPackage ./kitemmodels.nix {};
|
||||||
kitemviews = callPackage ./kitemviews.nix {};
|
kitemviews = callPackage ./kitemviews.nix {};
|
||||||
kjobwidgets = callPackage ./kjobwidgets.nix {};
|
kjobwidgets = callPackage ./kjobwidgets.nix {};
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
{ kdeFramework, lib, extra-cmake-modules, acl, karchive
|
{ kdeFramework, lib, copyPathsToStore
|
||||||
|
, extra-cmake-modules, acl, karchive
|
||||||
, kbookmarks, kcompletion, kconfig, kconfigwidgets, kcoreaddons
|
, kbookmarks, kcompletion, kconfig, kconfigwidgets, kcoreaddons
|
||||||
, kdbusaddons, kdoctools, ki18n, kiconthemes, kitemviews
|
, kdbusaddons, kdoctools, ki18n, kiconthemes, kitemviews
|
||||||
, kjobwidgets, knotifications, kservice, ktextwidgets, kwallet
|
, kjobwidgets, knotifications, kservice, ktextwidgets, kwallet
|
||||||
|
@ -8,6 +9,7 @@
|
||||||
|
|
||||||
kdeFramework {
|
kdeFramework {
|
||||||
name = "kio";
|
name = "kio";
|
||||||
|
patches = copyPathsToStore (lib.readPathsFromFile ./. ./series);
|
||||||
nativeBuildInputs = [ extra-cmake-modules kdoctools makeQtWrapper ];
|
nativeBuildInputs = [ extra-cmake-modules kdoctools makeQtWrapper ];
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
acl karchive kconfig kcoreaddons kdbusaddons kiconthemes
|
acl karchive kconfig kcoreaddons kdbusaddons kiconthemes
|
|
@ -0,0 +1,28 @@
|
||||||
|
Index: kio-5.17.0/src/core/ksambashare.cpp
|
||||||
|
===================================================================
|
||||||
|
--- kio-5.17.0.orig/src/core/ksambashare.cpp
|
||||||
|
+++ kio-5.17.0/src/core/ksambashare.cpp
|
||||||
|
@@ -67,13 +67,18 @@ KSambaSharePrivate::~KSambaSharePrivate(
|
||||||
|
|
||||||
|
bool KSambaSharePrivate::isSambaInstalled()
|
||||||
|
{
|
||||||
|
- if (QFile::exists(QStringLiteral("/usr/sbin/smbd"))
|
||||||
|
- || QFile::exists(QStringLiteral("/usr/local/sbin/smbd"))) {
|
||||||
|
- return true;
|
||||||
|
+ const QByteArray pathEnv = qgetenv("PATH");
|
||||||
|
+ if (!pathEnv.isEmpty()) {
|
||||||
|
+ QLatin1Char pathSep(':');
|
||||||
|
+ QStringList paths = QFile::decodeName(pathEnv).split(pathSep, QString::SkipEmptyParts);
|
||||||
|
+ for (QStringList::iterator it = paths.begin(); it != paths.end(); ++it) {
|
||||||
|
+ it->append("/smbd");
|
||||||
|
+ if (QFile::exists(*it)) {
|
||||||
|
+ return true;
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
|
||||||
|
- //qDebug() << "Samba is not installed!";
|
||||||
|
-
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
samba-search-path.patch
|
Loading…
Reference in New Issue