kdePackages.kio-extras: add a manpage search path for nixos

Add the path /run/current-system/etc/man_db.conf. With my previous commits in this PR, khelpcenter is able to search for manpages because it calls out to man-db, but it doesn't know where to find them when asked to display them.
This commit is contained in:
J. T. Elscott
2025-05-01 20:55:57 -07:00
parent 513de13f42
commit 615baa8d74
2 changed files with 17 additions and 0 deletions
@@ -0,0 +1,13 @@
diff --git a/man/kio_man.cpp b/man/kio_man.cpp
index a2fb6dbf5..cb6f373bc 100644
--- a/man/kio_man.cpp
+++ b/man/kio_man.cpp
@@ -868,6 +868,8 @@ void MANProtocol::constructPath(QStringList &constr_path, QStringList constr_cat
mc.setFileName("/etc/manpath.config"); // SuSE, Debian
if (!mc.exists())
mc.setFileName("/etc/man.config"); // Mandrake
+ if (!mc.exists())
+ mc.setFileName("/run/current-system/etc/man_db.conf"); // NixOS
if (mc.open(QIODevice::ReadOnly)) {
QTextStream is(&mc);
+4
View File
@@ -19,6 +19,10 @@
mkKdeDerivation {
pname = "kio-extras";
patches = [
# An upstream merge request is pending for this https://invent.kde.org/network/kio-extras/-/merge_requests/422
./add-nixos-man-db-config-path.patch
];
extraNativeBuildInputs = [
pkg-config
gperf