kinfocenter: add a bunch of tools for additional info
This commit is contained in:
parent
70d8e51d87
commit
f265af55c5
5 changed files with 157 additions and 63 deletions
|
@ -130,7 +130,7 @@ let
|
|||
kdeplasma-addons = callPackage ./kdeplasma-addons.nix { };
|
||||
kgamma5 = callPackage ./kgamma5.nix { };
|
||||
khotkeys = callPackage ./khotkeys.nix { };
|
||||
kinfocenter = callPackage ./kinfocenter.nix { };
|
||||
kinfocenter = callPackage ./kinfocenter { };
|
||||
kmenuedit = callPackage ./kmenuedit.nix { };
|
||||
kpipewire = callPackage ./kpipewire.nix { };
|
||||
kscreen = callPackage ./kscreen.nix { };
|
||||
|
|
|
@ -1,62 +0,0 @@
|
|||
{ mkDerivation
|
||||
, lib
|
||||
, extra-cmake-modules
|
||||
, kdoctools
|
||||
, qtbase
|
||||
, kcmutils
|
||||
, kcompletion
|
||||
, kconfig
|
||||
, kconfigwidgets
|
||||
, kcoreaddons
|
||||
, kdbusaddons
|
||||
, kdeclarative
|
||||
, ki18n
|
||||
, kiconthemes
|
||||
, kio
|
||||
, kirigami2
|
||||
, kpackage
|
||||
, kservice
|
||||
, kwayland
|
||||
, kwidgetsaddons
|
||||
, kxmlgui
|
||||
, solid
|
||||
, systemsettings
|
||||
, libraw1394
|
||||
, libGLU
|
||||
, pciutils
|
||||
}:
|
||||
|
||||
mkDerivation {
|
||||
pname = "kinfocenter";
|
||||
nativeBuildInputs = [ extra-cmake-modules kdoctools ];
|
||||
buildInputs = [
|
||||
kcmutils
|
||||
kcompletion
|
||||
kconfig
|
||||
kconfigwidgets
|
||||
kcoreaddons
|
||||
kdbusaddons
|
||||
kdeclarative
|
||||
ki18n
|
||||
kiconthemes
|
||||
kio
|
||||
kirigami2
|
||||
kpackage
|
||||
kservice
|
||||
kwayland
|
||||
kwidgetsaddons
|
||||
kxmlgui
|
||||
solid
|
||||
systemsettings
|
||||
|
||||
libraw1394
|
||||
libGLU
|
||||
pciutils
|
||||
];
|
||||
preFixup = ''
|
||||
# fix wrong symlink of infocenter pointing to a 'systemsettings5' binary in
|
||||
# the same directory, while it is actually located in a completely different
|
||||
# store path
|
||||
ln -sf ${lib.getBin systemsettings}/bin/systemsettings5 $out/bin/kinfocenter
|
||||
'';
|
||||
}
|
51
pkgs/desktops/plasma-5/kinfocenter/0001-tool-paths.patch
Normal file
51
pkgs/desktops/plasma-5/kinfocenter/0001-tool-paths.patch
Normal file
|
@ -0,0 +1,51 @@
|
|||
diff --git a/Modules/kwinsupportinfo/kcm_kwinsupportinfo.json.in b/Modules/kwinsupportinfo/kcm_kwinsupportinfo.json.in
|
||||
index f591b9c..e883212 100644
|
||||
--- a/Modules/kwinsupportinfo/kcm_kwinsupportinfo.json.in
|
||||
+++ b/Modules/kwinsupportinfo/kcm_kwinsupportinfo.json.in
|
||||
@@ -63,6 +63,6 @@
|
||||
"Name[x-test]": "xxWindow Managerxx",
|
||||
"Name[zh_CN]": "窗口管理器"
|
||||
},
|
||||
- "TryExec": "@QtBinariesDir@/qdbus",
|
||||
+ "TryExec": "@qdbus@",
|
||||
"X-KDE-KInfoCenter-Category": "graphical_information"
|
||||
}
|
||||
diff --git a/Modules/kwinsupportinfo/main.cpp b/Modules/kwinsupportinfo/main.cpp
|
||||
index 667c079..b727b67 100644
|
||||
--- a/Modules/kwinsupportinfo/main.cpp
|
||||
+++ b/Modules/kwinsupportinfo/main.cpp
|
||||
@@ -19,7 +19,7 @@ public:
|
||||
explicit KCMKWinSupportInfo(QObject *parent, const KPluginMetaData &data, const QVariantList &args)
|
||||
: ConfigModule(parent, data, args)
|
||||
{
|
||||
- auto outputContext = new CommandOutputContext(QLibraryInfo::location(QLibraryInfo::BinariesPath) + QStringLiteral("/qdbus"),
|
||||
+ auto outputContext = new CommandOutputContext(QStringLiteral("@qdbus@"),
|
||||
{QStringLiteral("org.kde.KWin"), QStringLiteral("/KWin"), QStringLiteral("supportInformation")},
|
||||
parent);
|
||||
qmlRegisterSingletonInstance("org.kde.kinfocenter.kwinsupportinfo.private", 1, 0, "InfoOutputContext", outputContext);
|
||||
diff --git a/Modules/xserver/kcm_xserver.json b/Modules/xserver/kcm_xserver.json
|
||||
index 04acd6b..24b8f36 100644
|
||||
--- a/Modules/xserver/kcm_xserver.json
|
||||
+++ b/Modules/xserver/kcm_xserver.json
|
||||
@@ -130,7 +130,7 @@
|
||||
"Name[zh_CN]": "X 服务器",
|
||||
"Name[zh_TW]": "X 伺服器"
|
||||
},
|
||||
- "TryExec": "xdpyinfo",
|
||||
+ "TryExec": "@xdpyinfo@",
|
||||
"X-DocPath": "kinfocenter/graphical.html#xserver",
|
||||
"X-KDE-KInfoCenter-Category": "graphical_information",
|
||||
"X-KDE-Keywords": "X,X-Server,XServer,XFree86,Display,VideoCard,System Information",
|
||||
diff --git a/Modules/xserver/main.cpp b/Modules/xserver/main.cpp
|
||||
index c406ff7..a261b90 100644
|
||||
--- a/Modules/xserver/main.cpp
|
||||
+++ b/Modules/xserver/main.cpp
|
||||
@@ -17,7 +17,7 @@ public:
|
||||
explicit KCMXServer(QObject *parent, const KPluginMetaData &data, const QVariantList &args)
|
||||
: ConfigModule(parent, data, args)
|
||||
{
|
||||
- auto outputContext = new CommandOutputContext(QStringLiteral("xdpyinfo"), {}, parent);
|
||||
+ auto outputContext = new CommandOutputContext(QStringLiteral("@xdpyinfo@"), {}, parent);
|
||||
qmlRegisterSingletonInstance("org.kde.kinfocenter.xserver.private", 1, 0, "InfoOutputContext", outputContext);
|
||||
|
||||
auto *about = new KAboutData(QStringLiteral("kcm_xserver"), i18nc("@label kcm name", "X-Server"), QStringLiteral("1.0"), QString(), KAboutLicense::GPL);
|
104
pkgs/desktops/plasma-5/kinfocenter/default.nix
Normal file
104
pkgs/desktops/plasma-5/kinfocenter/default.nix
Normal file
|
@ -0,0 +1,104 @@
|
|||
{ mkDerivation
|
||||
, lib
|
||||
, extra-cmake-modules
|
||||
, kdoctools
|
||||
, qtbase
|
||||
, qttools
|
||||
, kcmutils
|
||||
, kcompletion
|
||||
, kconfig
|
||||
, kconfigwidgets
|
||||
, kcoreaddons
|
||||
, kdbusaddons
|
||||
, kdeclarative
|
||||
, ki18n
|
||||
, kiconthemes
|
||||
, kio
|
||||
, kirigami2
|
||||
, kpackage
|
||||
, kservice
|
||||
, kwayland
|
||||
, kwidgetsaddons
|
||||
, kxmlgui
|
||||
, solid
|
||||
, systemsettings
|
||||
, dmidecode
|
||||
, fwupd
|
||||
, libraw1394
|
||||
, libusb1
|
||||
, libGLU
|
||||
, pciutils
|
||||
, smartmontools
|
||||
, util-linux
|
||||
, vulkan-tools
|
||||
, wayland-utils
|
||||
, xdpyinfo
|
||||
}:
|
||||
|
||||
let
|
||||
inherit (lib) getBin getExe;
|
||||
|
||||
qdbus = "${getBin qttools}/bin/qdbus";
|
||||
|
||||
in
|
||||
mkDerivation {
|
||||
pname = "kinfocenter";
|
||||
|
||||
nativeBuildInputs = [ extra-cmake-modules kdoctools ];
|
||||
|
||||
buildInputs = [
|
||||
kcmutils
|
||||
kcompletion
|
||||
kconfig
|
||||
kconfigwidgets
|
||||
kcoreaddons
|
||||
kdbusaddons
|
||||
kdeclarative
|
||||
ki18n
|
||||
kiconthemes
|
||||
kio
|
||||
kirigami2
|
||||
kpackage
|
||||
kservice
|
||||
kwayland
|
||||
kwidgetsaddons
|
||||
kxmlgui
|
||||
solid
|
||||
systemsettings
|
||||
|
||||
dmidecode
|
||||
fwupd
|
||||
libraw1394
|
||||
libusb1
|
||||
libGLU
|
||||
pciutils
|
||||
smartmontools
|
||||
util-linux
|
||||
vulkan-tools
|
||||
wayland-utils
|
||||
xdpyinfo
|
||||
];
|
||||
|
||||
patches = [
|
||||
./0001-tool-paths.patch
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
for f in Modules/kwinsupportinfo/{kcm_kwinsupportinfo.json.in,main.cpp}; do
|
||||
substituteInPlace $f \
|
||||
--replace "@qdbus@" "${qdbus}"
|
||||
done
|
||||
|
||||
for f in Modules/xserver/{kcm_xserver.json,main.cpp}; do
|
||||
substituteInPlace $f \
|
||||
--replace "@xdpyinfo@" "${getExe xdpyinfo}"
|
||||
done
|
||||
'';
|
||||
|
||||
# fix wrong symlink of infocenter pointing to a 'systemsettings5' binary in
|
||||
# the same directory, while it is actually located in a completely different
|
||||
# store path
|
||||
preFixup = ''
|
||||
ln -sf ${lib.getExe systemsettings} $out/bin/kinfocenter
|
||||
'';
|
||||
}
|
|
@ -45,4 +45,5 @@ mkDerivation {
|
|||
plasma-workspace
|
||||
];
|
||||
outputs = [ "bin" "dev" "out" ];
|
||||
meta.mainProgram = "systemsettings5";
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue