libkscreen: hardcode backends path
libkscreen provides all available kscreen backends, so there is no reason to search the environment for plugins.
This commit is contained in:
parent
a53f129c45
commit
c4c614c232
@ -62,7 +62,7 @@ let
|
||||
kwayland-integration = callPackage ./kwayland-integration.nix {};
|
||||
kwin = callPackage ./kwin {};
|
||||
kwrited = callPackage ./kwrited.nix {};
|
||||
libkscreen = callPackage ./libkscreen.nix {};
|
||||
libkscreen = callPackage ./libkscreen {};
|
||||
libksysguard = callPackage ./libksysguard {};
|
||||
milou = callPackage ./milou.nix {};
|
||||
oxygen = callPackage ./oxygen.nix {};
|
||||
|
@ -1,15 +0,0 @@
|
||||
{ plasmaPackage
|
||||
, extra-cmake-modules
|
||||
, kwayland, libXrandr
|
||||
, qtx11extras
|
||||
}:
|
||||
|
||||
plasmaPackage {
|
||||
name = "libkscreen";
|
||||
nativeBuildInputs = [
|
||||
extra-cmake-modules
|
||||
];
|
||||
propagatedBuildInputs = [
|
||||
kwayland libXrandr qtx11extras
|
||||
];
|
||||
}
|
19
pkgs/desktops/plasma-5/libkscreen/default.nix
Normal file
19
pkgs/desktops/plasma-5/libkscreen/default.nix
Normal file
@ -0,0 +1,19 @@
|
||||
{ plasmaPackage, lib, copyPathsToStore
|
||||
, extra-cmake-modules
|
||||
, kwayland, libXrandr
|
||||
, qtx11extras
|
||||
}:
|
||||
|
||||
plasmaPackage {
|
||||
name = "libkscreen";
|
||||
nativeBuildInputs = [
|
||||
extra-cmake-modules
|
||||
];
|
||||
propagatedBuildInputs = [
|
||||
kwayland libXrandr qtx11extras
|
||||
];
|
||||
patches = copyPathsToStore (lib.readPathsFromFile ./. ./series);
|
||||
preConfigure = ''
|
||||
NIX_CFLAGS_COMPILE+=" -DNIXPKGS_LIBKSCREEN_BACKENDS=\"''${!outputLib}/lib/qt5/plugins/kf5/kscreen\""
|
||||
'';
|
||||
}
|
@ -0,0 +1,27 @@
|
||||
Index: libkscreen-5.9.4/src/backendmanager.cpp
|
||||
===================================================================
|
||||
--- libkscreen-5.9.4.orig/src/backendmanager.cpp
|
||||
+++ libkscreen-5.9.4/src/backendmanager.cpp
|
||||
@@ -178,17 +178,11 @@ QFileInfo BackendManager::preferredBacke
|
||||
QFileInfoList BackendManager::listBackends()
|
||||
{
|
||||
// Compile a list of installed backends first
|
||||
- const QString backendFilter = QStringLiteral("KSC_*");
|
||||
- const QStringList paths = QCoreApplication::libraryPaths();
|
||||
- QFileInfoList finfos;
|
||||
- for (const QString &path : paths) {
|
||||
- const QDir dir(path + QLatin1String("/kf5/kscreen/"),
|
||||
- backendFilter,
|
||||
- QDir::SortFlags(QDir::QDir::Name),
|
||||
- QDir::NoDotAndDotDot | QDir::Files);
|
||||
- finfos.append(dir.entryInfoList());
|
||||
- }
|
||||
- return finfos;
|
||||
+ const QDir dir(QStringLiteral(NIXPKGS_LIBKSCREEN_BACKENDS),
|
||||
+ QStringLiteral("KSC_*"),
|
||||
+ QDir::SortFlags(QDir::QDir::Name),
|
||||
+ QDir::NoDotAndDotDot | QDir::Files);
|
||||
+ return dir.entryInfoList();
|
||||
}
|
||||
|
||||
KScreen::AbstractBackend *BackendManager::loadBackendPlugin(QPluginLoader *loader, const QString &name,
|
1
pkgs/desktops/plasma-5/libkscreen/series
Normal file
1
pkgs/desktops/plasma-5/libkscreen/series
Normal file
@ -0,0 +1 @@
|
||||
libkscreen-backends-path.patch
|
Loading…
Reference in New Issue
Block a user