push sheeet
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s

This commit is contained in:
Dark Steveneq
2025-10-09 14:15:47 +02:00
commit 646b892680
49168 changed files with 5897842 additions and 0 deletions

View File

@@ -0,0 +1,11 @@
--- a/src/aurorae.cpp
+++ b/src/aurorae.cpp
@@ -201,7 +201,7 @@ void Helper::init()
// so let's try to locate our plugin:
QString pluginPath;
for (const QString &path : m_engine->importPathList()) {
- QDirIterator it(path, QDirIterator::Subdirectories);
+ QDirIterator it(path, QDirIterator::Subdirectories | QDirIterator::FollowSymlinks);
while (it.hasNext()) {
it.next();
QFileInfo fileInfo = it.fileInfo();

View File

@@ -0,0 +1,14 @@
{
mkKdeDerivation,
qttools,
}:
mkKdeDerivation {
pname = "aurorae";
patches = [
# FIXME: upstream
./0001-follow-symlinks.patch
];
extraBuildInputs = [ qttools ];
}

View File

@@ -0,0 +1,9 @@
{
mkKdeDerivation,
shared-mime-info,
}:
mkKdeDerivation {
pname = "bluedevil";
extraNativeBuildInputs = [ shared-mime-info ];
}

View File

@@ -0,0 +1,19 @@
{ mkKdeDerivation }:
mkKdeDerivation {
pname = "breeze-grub";
# doesn't actually use cmake or anything
nativeBuildInputs = [ ];
buildInputs = [ ];
outputs = [ "out" ];
installPhase = ''
runHook preInstall
mkdir -p "$out/grub/themes"
mv breeze "$out/grub/themes"
runHook postInstall
'';
}

View File

@@ -0,0 +1,25 @@
From da6a4651f74625f4c7f3c31f1125cfa4e774780b Mon Sep 17 00:00:00 2001
From: Yaroslav Bolyukin <iam@lach.pw>
Date: Mon, 27 Sep 2021 22:45:58 +0300
Subject: [PATCH] fix: add executable bit
Signed-off-by: Yaroslav Bolyukin <iam@lach.pw>
---
src/CMakeLists.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 79ff12d..4f3d746 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -2,7 +2,7 @@ file(GLOB_RECURSE SCSS_SOURCES "*.scss")
file(GLOB CSS_SOURCES "*.css")
file(GLOB_RECURSE GTK2_SOURCES "gtk2/*")
-configure_file(build_theme.sh.cmake ${CMAKE_CURRENT_BINARY_DIR}/build_theme.sh @ONLY)
+configure_file(build_theme.sh.cmake ${CMAKE_CURRENT_BINARY_DIR}/build_theme.sh FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE @ONLY)
set(SOURCES
${SCSS_SOURCES}
--
2.33.0

View File

@@ -0,0 +1,18 @@
{
mkKdeDerivation,
sass,
python3,
python3Packages,
}:
mkKdeDerivation {
pname = "breeze-gtk";
# FIXME(later): upstream
patches = [ ./0001-fix-add-executable-bit.patch ];
extraNativeBuildInputs = [
sass
python3
python3Packages.pycairo
];
}

View File

@@ -0,0 +1,69 @@
{
lib,
mkKdeDerivation,
pkg-config,
plymouth,
imagemagick,
netpbm,
perl,
logoName ? null,
logoFile ? null,
osName ? null,
osVersion ? null,
topColor ? "black",
bottomColor ? "black",
}:
let
validColors = [
"black"
"cardboard_grey"
"charcoal_grey"
"icon_blue"
"paper_white"
"plasma_blue"
"neon_blue"
"neon_green"
];
resolvedLogoName =
if (logoFile != null && logoName == null) then
lib.strings.removeSuffix ".png" (baseNameOf (toString logoFile))
else
logoName;
in
assert lib.asserts.assertOneOf "topColor" topColor validColors;
assert lib.asserts.assertOneOf "bottomColor" bottomColor validColors;
mkKdeDerivation {
pname = "breeze-plymouth";
# FIXME(later): discuss with upstream
patches = [ ./install-paths.patch ];
extraNativeBuildInputs = [
pkg-config
]
++ lib.optionals (logoFile != null) [
imagemagick
netpbm
perl
];
extraBuildInputs = [ plymouth ];
extraCmakeFlags =
[ ]
++ lib.optional (osName != null) "-DDISTRO_NAME=${osName}"
++ lib.optional (osVersion != null) "-DDISTRO_VERSION=${osVersion}"
++ lib.optional (logoName != null) "-DDISTRO_LOGO=${logoName}"
++ lib.optional (topColor != null) "-DBACKGROUND_TOP_COLOR=${topColor}"
++ lib.optional (bottomColor != null) "-DBACKGROUND_BOTTOM_COLOR=${bottomColor}";
postPatch = ''
substituteInPlace cmake/FindPlymouth.cmake --subst-var out
''
+ lib.optionalString (logoFile != null) ''
cp ${logoFile} breeze/images/${resolvedLogoName}.logo.png
# conversion for 16bit taken from the breeze-plymouth readme
convert ${logoFile} -alpha Background -background "#000000" -fill "#000000" -flatten tmp.png
pngtopnm tmp.png | pnmquant 16 | pnmtopng > breeze/images/16bit/${resolvedLogoName}.logo.png
'';
}

View File

@@ -0,0 +1,19 @@
Index: breeze-plymouth-5.7.3/cmake/FindPlymouth.cmake
===================================================================
--- breeze-plymouth-5.7.3.orig/cmake/FindPlymouth.cmake
+++ breeze-plymouth-5.7.3/cmake/FindPlymouth.cmake
@@ -24,12 +24,8 @@
include(FindPkgConfig)
pkg_check_modules(Plymouth ply-boot-client ply-splash-core)
-exec_program(${PKG_CONFIG_EXECUTABLE}
- ARGS ply-splash-core --variable=pluginsdir
- OUTPUT_VARIABLE Plymouth_PLUGINSDIR)
-exec_program(${PKG_CONFIG_EXECUTABLE}
- ARGS ply-splash-core --variable=themesdir
- OUTPUT_VARIABLE Plymouth_THEMESDIR)
+set(Plymouth_PLUGINSDIR "@out@/lib/plymouth")
+set(Plymouth_THEMESDIR "@out@/share/plymouth/themes")
find_package_handle_standard_args(Plymouth
FOUND_VAR

View File

@@ -0,0 +1,52 @@
{
mkKdeDerivation,
qtbase,
qtsvg,
libsForQt5,
}:
mkKdeDerivation {
pname = "breeze";
outputs = [
"out"
"dev"
"qt5"
];
extraBuildInputs = [ qtsvg ];
# We can't add qt5 stuff to dependencies or the hooks blow up,
# so manually point everything to everything. Oof.
extraCmakeFlags = [
"-DQt5_DIR=${libsForQt5.qtbase.dev}/lib/cmake/Qt5"
"-DQt5Core_DIR=${libsForQt5.qtbase.dev}/lib/cmake/Qt5Core"
"-DQt5DBus_DIR=${libsForQt5.qtbase.dev}/lib/cmake/Qt5DBus"
"-DQt5Gui_DIR=${libsForQt5.qtbase.dev}/lib/cmake/Qt5Gui"
"-DQt5Network_DIR=${libsForQt5.qtbase.dev}/lib/cmake/Qt5Network"
"-DQt5Qml_DIR=${libsForQt5.qtdeclarative.dev}/lib/cmake/Qt5Qml"
"-DQt5QmlModels_DIR=${libsForQt5.qtdeclarative.dev}/lib/cmake/Qt5QmlModels"
"-DQt5Quick_DIR=${libsForQt5.qtdeclarative.dev}/lib/cmake/Qt5Quick"
"-DQt5Widgets_DIR=${libsForQt5.qtbase.dev}/lib/cmake/Qt5Widgets"
"-DQt5X11Extras_DIR=${libsForQt5.qtx11extras.dev}/lib/cmake/Qt5X11Extras"
"-DQt5Xml_DIR=${libsForQt5.qtbase.dev}/lib/cmake/Qt5Xml"
"-DKF5Auth_DIR=${libsForQt5.kauth.dev}/lib/cmake/KF5Auth"
"-DKF5Codecs_DIR=${libsForQt5.kcodecs.dev}/lib/cmake/KF5Codecs"
"-DKF5Config_DIR=${libsForQt5.kconfig.dev}/lib/cmake/KF5Config"
"-DKF5ConfigWidgets_DIR=${libsForQt5.kconfigwidgets.dev}/lib/cmake/KF5ConfigWidgets"
"-DKF5CoreAddons_DIR=${libsForQt5.kcoreaddons.dev}/lib/cmake/KF5CoreAddons"
"-DKF5FrameworkIntegration_DIR=${libsForQt5.frameworkintegration.dev}/lib/cmake/KF5FrameworkIntegration"
"-DKF5GuiAddons_DIR=${libsForQt5.kguiaddons.dev}/lib/cmake/KF5GuiAddons"
"-DKF5IconThemes_DIR=${libsForQt5.kiconthemes.dev}/lib/cmake/KF5IconThemes"
"-DKF5Kirigami2_DIR=${libsForQt5.kirigami2.dev}/lib/cmake/KF5Kirigami2"
"-DKF5WidgetsAddons_DIR=${libsForQt5.kwidgetsaddons.dev}/lib/cmake/KF5WidgetsAddons"
"-DKF5WindowSystem_DIR=${libsForQt5.kwindowsystem.dev}/lib/cmake/KF5WindowSystem"
];
# Move Qt5 plugin to Qt5 plugin path
postInstall = ''
mkdir -p $qt5/${libsForQt5.qtbase.qtPluginPrefix}/styles
mv $out/${qtbase.qtPluginPrefix}/styles/breeze5.so $qt5/${libsForQt5.qtbase.qtPluginPrefix}/styles
'';
meta.mainProgram = "breeze-settings6";
}

View File

@@ -0,0 +1,72 @@
{ callPackage }:
{
aurorae = callPackage ./aurorae { };
bluedevil = callPackage ./bluedevil { };
breeze = callPackage ./breeze { };
breeze-grub = callPackage ./breeze-grub { };
breeze-gtk = callPackage ./breeze-gtk { };
breeze-plymouth = callPackage ./breeze-plymouth { };
discover = callPackage ./discover { };
drkonqi = callPackage ./drkonqi { };
flatpak-kcm = callPackage ./flatpak-kcm { };
kactivitymanagerd = callPackage ./kactivitymanagerd { };
kde-cli-tools = callPackage ./kde-cli-tools { };
kde-gtk-config = callPackage ./kde-gtk-config { };
kdecoration = callPackage ./kdecoration { };
kdeplasma-addons = callPackage ./kdeplasma-addons { };
kgamma = callPackage ./kgamma { };
kglobalacceld = callPackage ./kglobalacceld { };
kinfocenter = callPackage ./kinfocenter { };
kmenuedit = callPackage ./kmenuedit { };
kpipewire = callPackage ./kpipewire { };
krdp = callPackage ./krdp { };
kscreen = callPackage ./kscreen { };
kscreenlocker = callPackage ./kscreenlocker { };
ksshaskpass = callPackage ./ksshaskpass { };
ksystemstats = callPackage ./ksystemstats { };
kwallet-pam = callPackage ./kwallet-pam { };
kwayland = callPackage ./kwayland { };
kwayland-integration = callPackage ./kwayland-integration { };
kwin = callPackage ./kwin { };
kwin-x11 = callPackage ./kwin-x11 { };
kwrited = callPackage ./kwrited { };
layer-shell-qt = callPackage ./layer-shell-qt { };
libkscreen = callPackage ./libkscreen { };
libksysguard = callPackage ./libksysguard { };
libplasma = callPackage ./libplasma { };
milou = callPackage ./milou { };
ocean-sound-theme = callPackage ./ocean-sound-theme { };
oxygen = callPackage ./oxygen { };
oxygen-sounds = callPackage ./oxygen-sounds { };
plasma-activities = callPackage ./plasma-activities { };
plasma-activities-stats = callPackage ./plasma-activities-stats { };
plasma-browser-integration = callPackage ./plasma-browser-integration { };
plasma-desktop = callPackage ./plasma-desktop { };
plasma-dialer = callPackage ./plasma-dialer { };
plasma-disks = callPackage ./plasma-disks { };
plasma-firewall = callPackage ./plasma-firewall { };
plasma-integration = callPackage ./plasma-integration { };
plasma-mobile = callPackage ./plasma-mobile { };
plasma-nano = callPackage ./plasma-nano { };
plasma-nm = callPackage ./plasma-nm { };
plasma-pa = callPackage ./plasma-pa { };
plasma-sdk = callPackage ./plasma-sdk { };
plasma-systemmonitor = callPackage ./plasma-systemmonitor { };
plasma-thunderbolt = callPackage ./plasma-thunderbolt { };
plasma-vault = callPackage ./plasma-vault { };
plasma-welcome = callPackage ./plasma-welcome { };
plasma-workspace = callPackage ./plasma-workspace { };
plasma-workspace-wallpapers = callPackage ./plasma-workspace-wallpapers { };
plasma5support = callPackage ./plasma5support { };
plymouth-kcm = callPackage ./plymouth-kcm { };
polkit-kde-agent-1 = callPackage ./polkit-kde-agent-1 { };
powerdevil = callPackage ./powerdevil { };
print-manager = callPackage ./print-manager { };
qqc2-breeze-style = callPackage ./qqc2-breeze-style { };
sddm-kcm = callPackage ./sddm-kcm { };
spacebar = callPackage ./spacebar { };
spectacle = callPackage ./spectacle { };
systemsettings = callPackage ./systemsettings { };
wacomtablet = callPackage ./wacomtablet { };
xdg-desktop-portal-kde = callPackage ./xdg-desktop-portal-kde { };
}

View File

@@ -0,0 +1,29 @@
{
mkKdeDerivation,
qtwebview,
pkg-config,
discount,
flatpak,
fwupd,
}:
mkKdeDerivation {
pname = "discover";
patches = [
# remove forced QML dependency check
# FIXME: fix the check in ECM instead
./qml-deps.patch
];
extraNativeBuildInputs = [ pkg-config ];
extraBuildInputs = [
qtwebview
discount
flatpak
fwupd
];
# The PackageKit backend doesn't work for us and causes Discover
# to freak out when loading. Disable it to not confuse users.
excludeDependencies = [ "packagekit-qt" ];
}

View File

@@ -0,0 +1,13 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 04523c97d..945ba6a41 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -59,7 +59,7 @@ find_package(QCoro6 REQUIRED COMPONENTS Core)
qcoro_enable_coroutines()
-ecm_find_qmlmodule(org.kde.kitemmodels 1.0 REQUIRED)
+ecm_find_qmlmodule(org.kde.kitemmodels 1.0)
list(APPEND CMAKE_AUTOMOC_MACRO_NAMES "DISCOVER_BACKEND_PLUGIN")

View File

@@ -0,0 +1,43 @@
{
mkKdeDerivation,
pkg-config,
systemd,
elfutils,
gdb,
python3,
replaceVars,
}:
let
gdb' = gdb.override {
hostCpuOnly = true;
python3 = python3.withPackages (ps: [
ps.psutil
ps.pygdbmi
ps.sentry-sdk
]);
};
in
mkKdeDerivation {
pname = "drkonqi";
patches = [
(replaceVars ./hardcode-paths.patch {
gdb = "${gdb'}/bin/gdb";
eu-unstrip = "${elfutils}/bin/eu-unstrip";
})
];
extraNativeBuildInputs = [ pkg-config ];
extraBuildInputs = [ systemd ];
extraCmakeFlags = [
"-DWITH_GDB12=1"
"-DWITH_PYTHON_VENDORING=0"
];
# Hardcoded as QString, which is UTF-16 so Nix can't pick it up automatically
postFixup = ''
mkdir -p $out/nix-support
echo "${gdb'}" > $out/nix-support/depends
'';
}

View File

@@ -0,0 +1,49 @@
diff --git a/src/data/gdb_preamble/preamble.py b/src/data/gdb_preamble/preamble.py
index 4855231b5..a488025c1 100644
--- a/src/data/gdb_preamble/preamble.py
+++ b/src/data/gdb_preamble/preamble.py
@@ -773,7 +773,7 @@ def resolve_modules():
# core doesn't contain one. That makes the ids a bit unreliable but still better than nothing I suppose.
# Ultimately we'll want to use gdb here.
# https://sourceware.org/bugzilla/show_bug.cgi?id=32844
- output = get_stdout(['eu-unstrip', "--list-only", f"--core={corefile}"], env=env)
+ output = get_stdout(['@eu-unstrip@', "--list-only", f"--core={corefile}"], env=env)
for line in output.splitlines():
image = CoreImage(line)
if image.valid:
diff --git a/src/debugger.cpp b/src/debugger.cpp
index 946bdd12e..5c24b3713 100644
--- a/src/debugger.cpp
+++ b/src/debugger.cpp
@@ -36,12 +36,12 @@ QList<Debugger> Debugger::availableInternalDebuggers(const QString &backend)
result.push_back(std::make_shared<Data>(
Data{.displayName = i18nc("@label the debugger called GDB", "GDB"),
.codeName = u"gdb"_s,
- .tryExec = u"gdb"_s,
+ .tryExec = u"@gdb@"_s,
.backendData =
- BackendData{.command = u"gdb -nw -n -batch -x %preamblefile -x %tempfile -p %pid %execpath"_s,
+ BackendData{.command = u"@gdb@ -nw -n -batch -x %preamblefile -x %tempfile -p %pid %execpath"_s,
.supportsCommandWithSymbolResolution = true,
.commandWithSymbolResolution =
- u"gdb -nw -n -batch --init-eval-command='set debuginfod enabled on' -x %preamblefile -x %tempfile -p %pid %execpath"_s,
+ u"@gdb@ -nw -n -batch --init-eval-command='set debuginfod enabled on' -x %preamblefile -x %tempfile -p %pid %execpath"_s,
.backtraceBatchCommands = u"thread\nthread apply all bt"_s,
.preambleCommands = expandCommand(
u"gdb"_s,
@@ -63,12 +63,12 @@ QList<Debugger> Debugger::availableInternalDebuggers(const QString &backend)
Data{
.displayName = i18nc("@label the debugger called GDB", "GDB"),
.codeName = u"gdb"_s,
- .tryExec = u"gdb"_s,
+ .tryExec = u"@gdb@"_s,
.backendData = BackendData{
- .command = u"gdb --nw --nx --batch --command=%preamblefile --command=%tempfile --core=%corefile %execpath"_s,
+ .command = u"@gdb@ --nw --nx --batch --command=%preamblefile --command=%tempfile --core=%corefile %execpath"_s,
.supportsCommandWithSymbolResolution = true,
.commandWithSymbolResolution =
- u"gdb --nw --nx --batch --init-eval-command='set debuginfod enabled on' --command=%preamblefile --command=%tempfile --core=%corefile %execpath"_s,
+ u"@gdb@ --nw --nx --batch --init-eval-command='set debuginfod enabled on' --command=%preamblefile --command=%tempfile --core=%corefile %execpath"_s,
.backtraceBatchCommands = u"thread\nthread apply all bt"_s,
.preambleCommands = expandCommand(
u"gdb"_s,

View File

@@ -0,0 +1,15 @@
{
mkKdeDerivation,
pkg-config,
qtsvg,
flatpak,
}:
mkKdeDerivation {
pname = "flatpak-kcm";
extraNativeBuildInputs = [ pkg-config ];
extraBuildInputs = [
flatpak
qtsvg
];
}

View File

@@ -0,0 +1,13 @@
{
mkKdeDerivation,
qt5compat,
boost,
}:
mkKdeDerivation {
pname = "kactivitymanagerd";
extraBuildInputs = [
qt5compat
boost
];
}

View File

@@ -0,0 +1,9 @@
{
mkKdeDerivation,
qtsvg,
}:
mkKdeDerivation {
pname = "kde-cli-tools";
extraBuildInputs = [ qtsvg ];
}

View File

@@ -0,0 +1,21 @@
diff --git a/kded/gtkconfig.cpp b/kded/gtkconfig.cpp
index 5303636..199c4d5 100644
--- a/kded/gtkconfig.cpp
+++ b/kded/gtkconfig.cpp
@@ -41,6 +41,16 @@ GtkConfig::GtkConfig(QObject *parent, const QVariantList&) :
kdeglobalsConfigWatcher(KConfigWatcher::create(KSharedConfig::openConfig(QStringLiteral("kdeglobals")))),
kwinConfigWatcher(KConfigWatcher::create(KSharedConfig::openConfig(QStringLiteral("kwinrc"))))
{
+ // Add GSETTINGS_SCHEMAS_PATH to the front of XDG_DATA_DIRS.
+ // Normally this would be done by wrapGAppsHook, but this plugin
+ // (shared object) cannot be wrapped.
+ QByteArray xdgdata = qgetenv("XDG_DATA_DIRS");
+ if (!xdgdata.isEmpty()) {
+ xdgdata.push_front(":");
+ }
+ xdgdata.push_front(QByteArray(GSETTINGS_SCHEMAS_PATH));
+ qputenv("XDG_DATA_DIRS", xdgdata);
+
QDBusConnection dbus = QDBusConnection::sessionBus();
dbus.registerService(QStringLiteral("org.kde.GtkConfig"));
dbus.registerObject(QStringLiteral("/GtkConfig"), this, QDBusConnection::ExportScriptableSlots);

View File

@@ -0,0 +1,45 @@
{
lib,
mkKdeDerivation,
replaceVars,
procps,
xsettingsd,
pkg-config,
wrapGAppsHook3,
sass,
qtsvg,
gsettings-desktop-schemas,
}:
mkKdeDerivation {
pname = "kde-gtk-config";
# The gtkconfig KDED module will crash the daemon if the GSettings schemas
# aren't found.
patches = [
./0001-gsettings-schemas-path.patch
(replaceVars ./dependency-paths.patch {
pgrep = lib.getExe' procps "pgrep";
xsettingsd = lib.getExe xsettingsd;
})
];
preConfigure = ''
NIX_CFLAGS_COMPILE+=" -DGSETTINGS_SCHEMAS_PATH=\"$GSETTINGS_SCHEMAS_PATH\""
'';
extraNativeBuildInputs = [
pkg-config
wrapGAppsHook3
sass
];
extraBuildInputs = [ qtsvg ];
dontWrapGApps = true; # There is nothing to wrap
extraCmakeFlags = [ "-DGLIB_SCHEMAS_DIR=${gsettings-desktop-schemas.out}/" ];
# Hardcoded as QStrings, which are UTF-16 so Nix can't pick these up automatically
postFixup = ''
mkdir -p $out/nix-support
echo "${procps} ${xsettingsd}" > $out/nix-support/depends
'';
}

View File

@@ -0,0 +1,22 @@
diff --git a/kded/config_editor/xsettings.cpp b/kded/config_editor/xsettings.cpp
index 1f9fe5b..9824973 100644
--- a/kded/config_editor/xsettings.cpp
+++ b/kded/config_editor/xsettings.cpp
@@ -46,7 +46,7 @@ void replaceValueInXSettingsdContents(QString &xSettingsdContents, const QString
pid_t pidOfXSettingsd()
{
QProcess pgrep;
- pgrep.start(QStringLiteral("pgrep"),
+ pgrep.start(QStringLiteral("@pgrep@"),
QStringList{
QStringLiteral("-u"),
QString::number(getuid()),
@@ -67,7 +67,7 @@ reloadXSettingsd(void *)
{
pid_t xSettingsdPid = pidOfXSettingsd();
if (xSettingsdPid == 0) {
- QProcess::startDetached(QStandardPaths::findExecutable(QStringLiteral("xsettingsd")), QStringList());
+ QProcess::startDetached(QStringLiteral("@xsettingsd@"), QStringList());
} else {
kill(xSettingsdPid, SIGHUP);
}

View File

@@ -0,0 +1,4 @@
{ mkKdeDerivation }:
mkKdeDerivation {
pname = "kdecoration";
}

View File

@@ -0,0 +1,9 @@
{
mkKdeDerivation,
qtwebengine,
}:
mkKdeDerivation {
pname = "kdeplasma-addons";
extraBuildInputs = [ qtwebengine ];
}

View File

@@ -0,0 +1,9 @@
{
mkKdeDerivation,
xorg,
}:
mkKdeDerivation {
pname = "kgamma";
extraBuildInputs = [ xorg.libXxf86vm ];
}

View File

@@ -0,0 +1,4 @@
{ mkKdeDerivation }:
mkKdeDerivation {
pname = "kglobalacceld";
}

View File

@@ -0,0 +1,405 @@
diff --git a/kcms/audio_information/kcm_audio_information.json b/kcms/audio_information/kcm_audio_information.json
index 7ece92ee..a4fb6664 100644
--- a/kcms/audio_information/kcm_audio_information.json
+++ b/kcms/audio_information/kcm_audio_information.json
@@ -82,7 +82,7 @@
"Name[zh_CN]": "音频",
"Name[zh_TW]": "音訊"
},
- "TryExec": "pactl",
+ "TryExec": "@pactl@",
"X-KDE-KInfoCenter-Category": "device_information",
"X-KDE-Keywords": "Pipewire,Audio,PulseAudio,pactl",
"X-KDE-Keywords[ar]": "Pipewire,Audio,PulseAudio,pactl,بايبواير,الصوت,بولس أوديو",
diff --git a/kcms/audio_information/main.cpp b/kcms/audio_information/main.cpp
index adb196fd..9d6c8675 100644
--- a/kcms/audio_information/main.cpp
+++ b/kcms/audio_information/main.cpp
@@ -16,7 +16,7 @@ public:
explicit KCMAudioInformation(QObject *parent, const KPluginMetaData &data)
: KQuickConfigModule(parent, data)
{
- m_outputContext = new CommandOutputContext(QStringLiteral("pactl"), {"list"}, parent);
+ m_outputContext = new CommandOutputContext(QStringLiteral("@pactl@"), {"list"}, parent);
}
CommandOutputContext *outputContext() const
{
diff --git a/kcms/block_devices/kcm_block_devices.json b/kcms/block_devices/kcm_block_devices.json
index f73cf5a5..b18ecbfb 100644
--- a/kcms/block_devices/kcm_block_devices.json
+++ b/kcms/block_devices/kcm_block_devices.json
@@ -82,7 +82,7 @@
"Name[zh_CN]": "块设备",
"Name[zh_TW]": "區塊裝置"
},
- "TryExec": "lsblk",
+ "TryExec": "@lsblk@",
"X-KDE-KInfoCenter-Category": "device_information",
"X-KDE-Keywords": "lsblk,block device,partition,disk,drive,hdd,ssd,nvme",
"X-KDE-Keywords[ar]": "lsblk,block device,partition,disk,drive,hdd,ssd,nvme,قرص,قسم,قطاع جهاز",
diff --git a/kcms/block_devices/main.cpp b/kcms/block_devices/main.cpp
index 2de923f3..6b14f7fb 100644
--- a/kcms/block_devices/main.cpp
+++ b/kcms/block_devices/main.cpp
@@ -20,7 +20,7 @@ public:
{
// NOTE: careful when using -o, it tends to incorrectly print multiple mountpoints as a single path
// (e.g. when different btrfs subvolumes are mounted at various points in the system it ought to enumerate all mountpoints)
- m_outputContext = new CommandOutputContext(u"lsblk"_s, {}, parent);
+ m_outputContext = new CommandOutputContext(u"@lsblk@"_s, {}, parent);
}
CommandOutputContext *outputContext() const
{
diff --git a/kcms/cpu/kcm_cpu.json b/kcms/cpu/kcm_cpu.json
index e8fb086e..c87b98f8 100644
--- a/kcms/cpu/kcm_cpu.json
+++ b/kcms/cpu/kcm_cpu.json
@@ -104,7 +104,7 @@
"Name[zh_CN]": "CPU",
"Name[zh_TW]": "CPU"
},
- "TryExec": "lscpu",
+ "TryExec": "@lscpu@",
"X-KDE-KInfoCenter-Category": "device_information",
"X-KDE-Keywords": "cpu,amd,intel,arm,instructions,cores,architecture,byte order",
"X-KDE-Keywords[ar]": "cpu,amd,intel,arm,instructions,cores,architecture,byte order,تعليمات,أنوية,معمارية",
diff --git a/kcms/cpu/main.cpp b/kcms/cpu/main.cpp
index 608381eb..8fd7914f 100644
--- a/kcms/cpu/main.cpp
+++ b/kcms/cpu/main.cpp
@@ -16,7 +16,7 @@ public:
explicit KCMCPU(QObject *parent, const KPluginMetaData &data)
: KQuickConfigModule(parent, data)
{
- m_outputContext = new CommandOutputContext(QStringLiteral("lscpu"), {}, parent);
+ m_outputContext = new CommandOutputContext(QStringLiteral("@lscpu@"), {}, parent);
}
CommandOutputContext *outputContext() const
{
diff --git a/kcms/edid/edid.sh b/kcms/edid/edid.sh
index da803598..4e24eaaf 100755
--- a/kcms/edid/edid.sh
+++ b/kcms/edid/edid.sh
@@ -13,7 +13,7 @@ for card in /sys/class/drm/card*; do
# Try to read any data. If it fails continue. This prevents errors from di-edid-decode.
IFS= read -r data < "$edid" || continue
- data=$(di-edid-decode "$edid" 2>&1) || true
+ data=$(@di_edid_decode@ "$edid" 2>&1) || true
printf "# %s #######################\n" "$(basename "$card")"
printf "%s\n\n" "$data"
done
diff --git a/kcms/edid/kcm_edid.json b/kcms/edid/kcm_edid.json
index e180df8d..3d5bbd0b 100644
--- a/kcms/edid/kcm_edid.json
+++ b/kcms/edid/kcm_edid.json
@@ -72,7 +72,7 @@
"Name[zh_CN]": "EDID",
"Name[zh_TW]": "EDID"
},
- "TryExec": "di-edid-decode",
+ "TryExec": "@di_edid_decode@",
"X-KDE-KInfoCenter-Category": "graphical_information",
"X-KDE-Keywords": "EDID,Graphics",
"X-KDE-Keywords[ar]": "EDID,Graphics,الرسوميات,بيانات تعريف العرض الممتدة",
diff --git a/kcms/edid/main.cpp b/kcms/edid/main.cpp
index 9f04e7fd..8ef37d2c 100644
--- a/kcms/edid/main.cpp
+++ b/kcms/edid/main.cpp
@@ -20,7 +20,7 @@ public:
{
const QString executable =
QStandardPaths::locate(QStandardPaths::GenericDataLocation, QStringLiteral("kinfocenter/edid/edid.sh"), QStandardPaths::LocateFile);
- m_outputContext = new CommandOutputContext({QStringLiteral("di-edid-decode")}, QStringLiteral("/bin/sh"), {executable}, parent);
+ m_outputContext = new CommandOutputContext({QStringLiteral("@di_edid_decode@")}, QStringLiteral("/bin/sh"), {executable}, parent);
}
[[nodiscard]] CommandOutputContext *outputContext() const
{
diff --git a/kcms/egl/kcm_egl.json b/kcms/egl/kcm_egl.json
index 02a90071..64bfb609 100644
--- a/kcms/egl/kcm_egl.json
+++ b/kcms/egl/kcm_egl.json
@@ -104,7 +104,7 @@
"Name[zh_CN]": "OpenGL (EGL)",
"Name[zh_TW]": "OpenGL (EGL)"
},
- "TryExec": "eglinfo",
+ "TryExec": "@eglinfo@",
"X-KDE-KInfoCenter-Category": "graphical_information",
"X-KDE-Keywords": "OpenGL,DRI,3D,VideoCard,Hardware Acceleration,Graphics,EGL",
"X-KDE-Keywords[ar]": "OpenGL,DRI,3D,VideoCard,Hardware Acceleration,Graphics,EGL,بطاقة الرسوميات,تسريع العتاد,رسوميات",
diff --git a/kcms/egl/main.cpp b/kcms/egl/main.cpp
index 1a509dac..886a62d8 100644
--- a/kcms/egl/main.cpp
+++ b/kcms/egl/main.cpp
@@ -16,7 +16,7 @@ public:
explicit KCMXServer(QObject *parent, const KPluginMetaData &data)
: KQuickConfigModule(parent, data)
{
- m_outputContext = new CommandOutputContext(QStringLiteral("eglinfo"), {}, parent);
+ m_outputContext = new CommandOutputContext(QStringLiteral("@eglinfo@"), {}, parent);
}
CommandOutputContext *outputContext() const
{
diff --git a/kcms/firmware_security/main.cpp b/kcms/firmware_security/main.cpp
index eab20e0f..5a0d2499 100644
--- a/kcms/firmware_security/main.cpp
+++ b/kcms/firmware_security/main.cpp
@@ -20,7 +20,7 @@ public:
const QString executable = QStandardPaths::locate(QStandardPaths::GenericDataLocation,
QStringLiteral("kinfocenter/firmware_security/fwupdmgr.sh"),
QStandardPaths::LocateFile);
- m_outputContext = new CommandOutputContext({QStringLiteral("fwupdmgr"), QStringLiteral("aha")},
+ m_outputContext = new CommandOutputContext({QStringLiteral("fwupdmgr"), QStringLiteral("@aha@")},
QStringLiteral("/bin/sh"),
{executable},
Qt::TextFormat::RichText,
diff --git a/kcms/glx/kcm_glx.json b/kcms/glx/kcm_glx.json
index 8a56690a..e2caaec7 100644
--- a/kcms/glx/kcm_glx.json
+++ b/kcms/glx/kcm_glx.json
@@ -103,7 +103,7 @@
"Name[zh_CN]": "OpenGL (GLX)",
"Name[zh_TW]": "OpenGL (GLX)"
},
- "TryExec": "glxinfo",
+ "TryExec": "@glxinfo@",
"X-KDE-KInfoCenter-Category": "graphical_information",
"X-KDE-Keywords": "OpenGL,DRI,GLX,3D,VideoCard,Hardware Acceleration,Graphics,X,X11,Xserver,X-Server,XFree86,Display",
"X-KDE-Keywords[ar]": "OpenGL,DRI,GLX,3D,VideoCard,Hardware Acceleration,Graphics,X,X11,Xserver,X-Server,XFree86,Display,بطاقة الرسوميات,تسريع العتاد,الرسوميات",
diff --git a/kcms/glx/main.cpp b/kcms/glx/main.cpp
index a7317411..a6c5621d 100644
--- a/kcms/glx/main.cpp
+++ b/kcms/glx/main.cpp
@@ -16,7 +16,7 @@ public:
explicit KCMXServer(QObject *parent, const KPluginMetaData &data)
: KQuickConfigModule(parent, data)
{
- m_outputContext = new CommandOutputContext(QStringLiteral("glxinfo"), {}, parent);
+ m_outputContext = new CommandOutputContext(QStringLiteral("@glxinfo@"), {}, parent);
}
CommandOutputContext *outputContext() const
{
diff --git a/kcms/helpers/dmidecode-helper/helper.cpp b/kcms/helpers/dmidecode-helper/helper.cpp
index 11921934..1160c5f0 100644
--- a/kcms/helpers/dmidecode-helper/helper.cpp
+++ b/kcms/helpers/dmidecode-helper/helper.cpp
@@ -20,10 +20,7 @@ auto make_array(Input &&...args) -> std::array<Output, sizeof...(args)> // NB: w
DMIDecodeHelper::DMIDecodeHelper(QObject *parent)
: QObject(parent)
{
- // PATH is super minimal when invoked through dbus
- setenv("PATH", "/usr/sbin:/sbin:/usr/local/sbin", 1);
-
- m_dmidecodePath = QStandardPaths::findExecutable("dmidecode");
+ m_dmidecodePath = QStringLiteral("@dmidecode@");
}
KAuth::ActionReply DMIDecodeHelper::memoryinformation(const QVariantMap &args)
diff --git a/kcms/kwinsupportinfo/kcm_kwinsupportinfo.json.in b/kcms/kwinsupportinfo/kcm_kwinsupportinfo.json.in
index 9e502d52..f9f26cbd 100644
--- a/kcms/kwinsupportinfo/kcm_kwinsupportinfo.json.in
+++ b/kcms/kwinsupportinfo/kcm_kwinsupportinfo.json.in
@@ -95,6 +95,6 @@
"Name[zh_CN]": "窗口管理器",
"Name[zh_TW]": "視窗管理員"
},
- "TryExec": "@QtBinariesDir@/qdbus",
+ "TryExec": "@qdbus@",
"X-KDE-KInfoCenter-Category": "graphical_information"
}
diff --git a/kcms/kwinsupportinfo/main.cpp b/kcms/kwinsupportinfo/main.cpp
index ddb55b5c..8dc6b668 100644
--- a/kcms/kwinsupportinfo/main.cpp
+++ b/kcms/kwinsupportinfo/main.cpp
@@ -18,7 +18,7 @@ public:
explicit KCMKWinSupportInfo(QObject *parent, const KPluginMetaData &data)
: KQuickConfigModule(parent, data)
{
- m_outputContext = new CommandOutputContext(QLibraryInfo::path(QLibraryInfo::BinariesPath) + QStringLiteral("/qdbus"),
+ m_outputContext = new CommandOutputContext(QStringLiteral("@qdbus@"),
{QStringLiteral("org.kde.KWin"), QStringLiteral("/KWin"), QStringLiteral("supportInformation")},
parent);
}
diff --git a/kcms/memory/kcm_memory.json b/kcms/memory/kcm_memory.json
index 20df9662..6a64c762 100644
--- a/kcms/memory/kcm_memory.json
+++ b/kcms/memory/kcm_memory.json
@@ -134,7 +134,7 @@
"Name[zh_CN]": "内存",
"Name[zh_TW]": "記憶體"
},
- "TryExec": "pkexec dmidecode",
+ "TryExec": "@dmidecode@",
"X-KDE-KInfoCenter-Category": "device_information",
"X-KDE-Keywords": "Memory,RAM,dmidecode",
"X-KDE-Keywords[ar]": "Memory,RAM,dmidecode,رام,ذاكرة,ذاكرة حية",
diff --git a/kcms/network/kcm_network.json b/kcms/network/kcm_network.json
index 5fc677a5..59ec49da 100644
--- a/kcms/network/kcm_network.json
+++ b/kcms/network/kcm_network.json
@@ -148,7 +148,7 @@
"Name[zh_CN]": "网络接口",
"Name[zh_TW]": "網路介面"
},
- "TryExec": "ip",
+ "TryExec": "@ip@",
"X-KDE-KInfoCenter-Category": "network_information",
"X-KDE-Keywords": "network,nic,ip,ip address,mac,inet,eth,wlan,wifi",
"X-KDE-Keywords[ar]": "network,nic,ip,ip address,mac,inet,eth,wlan,wifi,الشبكة,شبكة الاتصال,عنوان IP,عنوان IP,جهاز Mac,شبكة الإنترنت,شبكة ETH,شبكة WLAN,شبكة Wi-Fi",
diff --git a/kcms/network/main.cpp b/kcms/network/main.cpp
index f02577a3..479e18df 100644
--- a/kcms/network/main.cpp
+++ b/kcms/network/main.cpp
@@ -18,7 +18,7 @@ public:
explicit KCMNetwork(QObject *parent, const KPluginMetaData &data)
: KQuickConfigModule(parent, data)
{
- m_outputContext = new CommandOutputContext(u"ip"_s, {u"address"_s}, parent);
+ m_outputContext = new CommandOutputContext(u"@ip@"_s, {u"address"_s}, parent);
}
CommandOutputContext *outputContext() const
{
diff --git a/kcms/opencl/kcm_opencl.json b/kcms/opencl/kcm_opencl.json
index 61706cb9..b7fb9c59 100644
--- a/kcms/opencl/kcm_opencl.json
+++ b/kcms/opencl/kcm_opencl.json
@@ -92,7 +92,7 @@
"Name[zh_CN]": "OpenCL",
"Name[zh_TW]": "OpenCL"
},
- "TryExec": "clinfo",
+ "TryExec": "@clinfo@",
"X-KDE-KInfoCenter-Category": "graphical_information",
"X-KDE-Keywords": "OpenCL,VideoCard,Hardware Acceleration,Graphics",
"X-KDE-Keywords[ar]": "OpenCL,VideoCard,Hardware Acceleration,Graphics,بطاقة الفيديو,تسريع العتاد,الرسوميات",
diff --git a/kcms/opencl/main.cpp b/kcms/opencl/main.cpp
index d58728ab..88733d46 100644
--- a/kcms/opencl/main.cpp
+++ b/kcms/opencl/main.cpp
@@ -18,7 +18,7 @@ public:
explicit KCMOpenCL(QObject *parent, const KPluginMetaData &data)
: KQuickConfigModule(parent, data)
{
- m_outputContext = new CommandOutputContext(QStringLiteral("clinfo"), {}, parent);
+ m_outputContext = new CommandOutputContext(QStringLiteral("@clinfo@"), {}, parent);
}
CommandOutputContext *outputContext() const
{
diff --git a/kcms/pci/CMakeLists.txt b/kcms/pci/CMakeLists.txt
index 36d82ef8..16ce2703 100644
--- a/kcms/pci/CMakeLists.txt
+++ b/kcms/pci/CMakeLists.txt
@@ -19,7 +19,7 @@ else()
find_package(lspci)
set_package_properties(lspci PROPERTIES TYPE RUNTIME)
- set(PCI_BACKEND lspci)
+ set(PCI_BACKEND @lspci@)
set(PCI_BACKEND_ARGUMENTS "-v")
endif()
diff --git a/kcms/sensors/kcm_sensors.json b/kcms/sensors/kcm_sensors.json
index e1994f2c..e1c27245 100644
--- a/kcms/sensors/kcm_sensors.json
+++ b/kcms/sensors/kcm_sensors.json
@@ -58,7 +58,7 @@
"Name[zh_CN]": "传感器",
"Name[zh_TW]": "感測器"
},
- "TryExec": "sensors",
+ "TryExec": "@sensors@",
"X-KDE-KInfoCenter-Category": "device_information",
"X-KDE-Keywords": "lm_sensors,sensors,temp,temperature,volt,voltage,sensors,fan,fan speed,monitoring,amp,amps,current,power",
"X-KDE-Keywords[ar]": "مستشعرات lm,مستشعرات,درجة الحرارة,درجة الحرارة,فولت,جهد,مستشعرات,مروحة,سرعة المروحة,مراقبة,أمبير,أمبير,تيار,طاقة",
diff --git a/kcms/sensors/main.cpp b/kcms/sensors/main.cpp
index 8dae9f8f..ee70f381 100644
--- a/kcms/sensors/main.cpp
+++ b/kcms/sensors/main.cpp
@@ -18,7 +18,7 @@ public:
explicit KCMSensors(QObject *parent, const KPluginMetaData &data)
: KQuickConfigModule(parent, data)
{
- m_outputContext = new CommandOutputContext(u"sensors"_s, {}, parent);
+ m_outputContext = new CommandOutputContext(u"@sensors@"_s, {}, parent);
m_outputContext->setAutoRefreshMs(1000);
}
CommandOutputContext *outputContext() const
diff --git a/kcms/vulkan/kcm_vulkan.json b/kcms/vulkan/kcm_vulkan.json
index 9a297a07..2c30b20a 100644
--- a/kcms/vulkan/kcm_vulkan.json
+++ b/kcms/vulkan/kcm_vulkan.json
@@ -102,7 +102,7 @@
"Name[zh_CN]": "Vulkan",
"Name[zh_TW]": "Vulkan"
},
- "TryExec": "vulkaninfo",
+ "TryExec": "@vulkaninfo@",
"X-KDE-KInfoCenter-Category": "graphical_information",
"X-KDE-Keywords": "Vulkan,VideoCard,Hardware Acceleration,Graphics",
"X-KDE-Keywords[ar]": "Vulkan,VideoCard,Hardware Acceleration,Graphics,فولكان,بطاقة الفيديو,تسريع الأجهزة,الرسومات",
diff --git a/kcms/vulkan/main.cpp b/kcms/vulkan/main.cpp
index 5665d9d2..008f1bf0 100644
--- a/kcms/vulkan/main.cpp
+++ b/kcms/vulkan/main.cpp
@@ -16,7 +16,7 @@ public:
explicit KCMVulkan(QObject *parent, const KPluginMetaData &data)
: KQuickConfigModule(parent, data)
{
- m_outputContext = new CommandOutputContext(QStringLiteral("vulkaninfo"), {}, parent);
+ m_outputContext = new CommandOutputContext(QStringLiteral("@vulkaninfo@"), {}, parent);
}
CommandOutputContext *outputContext() const
{
diff --git a/kcms/wayland/kcm_wayland.json b/kcms/wayland/kcm_wayland.json
index 66022b79..1756eb0e 100644
--- a/kcms/wayland/kcm_wayland.json
+++ b/kcms/wayland/kcm_wayland.json
@@ -108,7 +108,7 @@
"Name[zh_CN]": "Wayland",
"Name[zh_TW]": "Wayland"
},
- "TryExec": "wayland-info",
+ "TryExec": "@waylandinfo@",
"X-KDE-KInfoCenter-Category": "graphical_information",
"X-KDE-Keywords": "Wayland,Compositor,Display,System Information",
"X-KDE-Keywords[ar]": "ويلاند,مراكب,عرض,معلومات النّظام",
diff --git a/kcms/wayland/main.cpp b/kcms/wayland/main.cpp
index 3a4825c7..4633927b 100644
--- a/kcms/wayland/main.cpp
+++ b/kcms/wayland/main.cpp
@@ -16,7 +16,7 @@ public:
explicit KCMWayland(QObject *parent, const KPluginMetaData &data)
: KQuickConfigModule(parent, data)
{
- m_outputContext = new CommandOutputContext(QStringLiteral("wayland-info"), {}, parent);
+ m_outputContext = new CommandOutputContext(QStringLiteral("@waylandinfo@"), {}, parent);
}
CommandOutputContext *outputContext() const
{
diff --git a/kcms/xserver/kcm_xserver.json b/kcms/xserver/kcm_xserver.json
index a5e64d94..81190779 100644
--- a/kcms/xserver/kcm_xserver.json
+++ b/kcms/xserver/kcm_xserver.json
@@ -148,7 +148,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/kcms/xserver/main.cpp b/kcms/xserver/main.cpp
index df9af24a..e5983e22 100644
--- a/kcms/xserver/main.cpp
+++ b/kcms/xserver/main.cpp
@@ -16,7 +16,7 @@ public:
explicit KCMXServer(QObject *parent, const KPluginMetaData &data)
: KQuickConfigModule(parent, data)
{
- m_outputContext = new CommandOutputContext(QStringLiteral("xdpyinfo"), {}, parent);
+ m_outputContext = new CommandOutputContext(QStringLiteral("@xdpyinfo@"), {}, parent);
}
CommandOutputContext *outputContext() const
{

View File

@@ -0,0 +1,81 @@
{
aha,
clinfo,
dmidecode,
iproute2,
lib,
libdisplay-info,
libusb1,
lm_sensors,
mesa-demos,
mkKdeDerivation,
pkg-config,
pciutils,
pulseaudio,
qttools,
replaceVars,
systemsettings,
util-linux,
vulkan-tools,
wayland-utils,
xdpyinfo,
}:
let
tools = {
aha = lib.getExe aha;
clinfo = lib.getExe clinfo;
di_edid_decode = lib.getExe libdisplay-info;
dmidecode = lib.getExe' dmidecode "dmidecode";
eglinfo = lib.getExe' mesa-demos "eglinfo";
glxinfo = lib.getExe' mesa-demos "glxinfo";
ip = lib.getExe' iproute2 "ip";
lsblk = lib.getExe' util-linux "lsblk";
lspci = lib.getExe' pciutils "lspci";
lscpu = lib.getExe' util-linux "lscpu";
pactl = lib.getExe' pulseaudio "pactl";
qdbus = lib.getExe' qttools "qdbus";
sensors = lib.getExe' lm_sensors "sensors";
vulkaninfo = lib.getExe' vulkan-tools "vulkaninfo";
waylandinfo = lib.getExe wayland-utils;
xdpyinfo = lib.getExe xdpyinfo;
};
in
mkKdeDerivation {
pname = "kinfocenter";
patches = [
# fwupdmgr is provided through NixOS' module
(replaceVars ./0001-tool-paths.patch (
{
# @QtBinariesDir@ only appears in the *removed* lines of the diff
QtBinariesDir = null;
}
// tools
))
];
postPatch = ''
substituteInPlace kcms/firmware_security/fwupdmgr.sh \
--replace-fail " aha " " ${lib.getExe aha} "
'';
extraNativeBuildInputs = [ pkg-config ];
extraBuildInputs = [ libusb1 ];
qtWrapperArgs = [ "--inherit-argv0" ];
# 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 ${systemsettings}/bin/systemsettings $out/bin/kinfocenter
'';
# Hardcoded as a QString, which is UTF-16 so Nix can't pick it up automatically
postFixup = ''
mkdir -p $out/nix-support
echo "${lib.concatStringsSep ":" (lib.attrValues tools)}" > $out/nix-support/depends
'';
meta.mainProgram = "kinfocenter";
}

View File

@@ -0,0 +1,5 @@
{ mkKdeDerivation }:
mkKdeDerivation {
pname = "kmenuedit";
meta.mainProgram = "kmenuedit";
}

View File

@@ -0,0 +1,21 @@
{
mkKdeDerivation,
qtquick3d,
pkg-config,
pipewire,
ffmpeg,
libgbm,
libva,
}:
mkKdeDerivation {
pname = "kpipewire";
extraNativeBuildInputs = [ pkg-config ];
extraBuildInputs = [
qtquick3d
pipewire
ffmpeg
libgbm
libva
];
}

View File

@@ -0,0 +1,24 @@
{
lib,
mkKdeDerivation,
replaceVars,
openssl,
pkg-config,
qtwayland,
freerdp,
}:
mkKdeDerivation {
pname = "krdp";
patches = [
(replaceVars ./hardcode-openssl-path.patch {
openssl = lib.getExe openssl;
})
];
extraNativeBuildInputs = [ pkg-config ];
extraBuildInputs = [
qtwayland
freerdp
];
}

View File

@@ -0,0 +1,13 @@
diff --git a/src/kcm/kcmkrdpserver.cpp b/src/kcm/kcmkrdpserver.cpp
index 3af527c..3433a84 100644
--- a/src/kcm/kcmkrdpserver.cpp
+++ b/src/kcm/kcmkrdpserver.cpp
@@ -218,7 +218,7 @@ void KRDPServerConfig::generateCertificate()
QString certificateKeyPath(QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) + QStringLiteral("/krdpserver/krdp.key"));
qDebug(KRDPKCM) << "Generating certificate files to: " << certificatePath << " and " << certificateKeyPath;
QProcess sslProcess;
- sslProcess.start(u"openssl"_qs,
+ sslProcess.start(u"@openssl@"_qs,
{
u"req"_qs,
u"-nodes"_qs,

View File

@@ -0,0 +1,25 @@
{
mkKdeDerivation,
pkg-config,
qtsensors,
qtwayland,
dbus,
wayland-protocols,
}:
mkKdeDerivation {
pname = "kscreen";
extraNativeBuildInputs = [ pkg-config ];
extraBuildInputs = [
qtsensors
qtwayland
wayland-protocols
];
postFixup = ''
substituteInPlace $out/share/kglobalaccel/org.kde.kscreen.desktop \
--replace-fail dbus-send ${dbus}/bin/dbus-send
'';
meta.mainProgram = "kscreen-console";
}

View File

@@ -0,0 +1,15 @@
{
mkKdeDerivation,
pam,
wayland-scanner,
qqc2-breeze-style,
}:
mkKdeDerivation {
pname = "kscreenlocker";
extraNativeBuildInputs = [ wayland-scanner ];
extraBuildInputs = [
pam
qqc2-breeze-style
];
}

View File

@@ -0,0 +1,5 @@
{ mkKdeDerivation }:
mkKdeDerivation {
pname = "ksshaskpass";
meta.mainProgram = "ksshaskpass";
}

View File

@@ -0,0 +1,26 @@
{
mkKdeDerivation,
pkg-config,
libksysguard,
networkmanager-qt,
lm_sensors,
libnl,
}:
mkKdeDerivation {
pname = "ksystemstats";
patches = [
./helper-path.patch
];
extraNativeBuildInputs = [ pkg-config ];
extraBuildInputs = [
networkmanager-qt
lm_sensors
libnl
];
extraCmakeFlags = [
"-DSYSTEMSTATS_DBUS_INTERFACE=${libksysguard}/share/dbus-1/interfaces/org.kde.ksystemstats1.xml"
];
}

View File

@@ -0,0 +1,10 @@
diff --git a/plugins/gpu/IntelHelperLocation.h.cmake b/plugins/gpu/IntelHelperLocation.h.cmake
index 6f9ba83..a252c1b 100644
--- a/plugins/gpu/IntelHelperLocation.h.cmake
+++ b/plugins/gpu/IntelHelperLocation.h.cmake
@@ -6,4 +6,4 @@
#pragma once
-constexpr auto helperLocation = "@KDE_INSTALL_FULL_LIBEXECDIR@/ksystemstats_intel_helper";
+constexpr auto helperLocation = "/run/wrappers/bin/ksystemstats_intel_helper";

View File

@@ -0,0 +1,21 @@
{
lib,
mkKdeDerivation,
pkg-config,
pam,
libgcrypt,
socat,
}:
mkKdeDerivation {
pname = "kwallet-pam";
postPatch = ''
sed -i pam_kwallet_init -e "s|socat|${lib.getBin socat}/bin/socat|"
'';
extraNativeBuildInputs = [ pkg-config ];
extraBuildInputs = [
pam
libgcrypt
];
}

View File

@@ -0,0 +1,41 @@
{
stdenv,
sources,
cmake,
pkg-config,
libsForQt5,
wayland-scanner,
plasma-wayland-protocols,
wayland,
wayland-protocols,
}:
# not mkKdeDerivation because this is Qt5 land
stdenv.mkDerivation rec {
pname = "kwayland-integration";
inherit (sources.${pname}) version;
src = sources.${pname};
nativeBuildInputs = [
cmake
pkg-config
libsForQt5.extra-cmake-modules
];
buildInputs = [
libsForQt5.qtbase
libsForQt5.qtwayland
libsForQt5.kwayland
libsForQt5.kwindowsystem
plasma-wayland-protocols
wayland
wayland-protocols
wayland-scanner
];
dontWrapQtApps = true;
}

View File

@@ -0,0 +1,11 @@
{
mkKdeDerivation,
pkg-config,
qtwayland,
}:
mkKdeDerivation {
pname = "kwayland";
extraNativeBuildInputs = [ pkg-config ];
extraBuildInputs = [ qtwayland ];
}

View File

@@ -0,0 +1,114 @@
From 29ec6fada935ef966e5859082435ed57daa9522d Mon Sep 17 00:00:00 2001
From: Samuel Dionne-Riel <samuel@dionne-riel.com>
Date: Tue, 16 Mar 2021 15:03:59 -0400
Subject: [PATCH] [NixOS] Unwrap executable name for .desktop search
Why is this necessary even though -a "$0" is used in the wrapper?
Because it's completely bypassing argv0! This looks at the executable
file in-use according to the kernel!
Wrappers cannot affect the `/proc/.../exe` symlink!
Co-authored-by: Yaroslav Bolyukin <iam@lach.pw>
---
src/nixos_utils.h | 41 +++++++++++++++++++++++++++++++++++++++++
src/service_utils.h | 4 +++-
src/waylandwindow.cpp | 5 ++++-
3 files changed, 48 insertions(+), 2 deletions(-)
create mode 100644 src/nixos_utils.h
diff --git a/src/nixos_utils.h b/src/nixos_utils.h
new file mode 100644
index 0000000..726065d
--- /dev/null
+++ b/src/nixos_utils.h
@@ -0,0 +1,41 @@
+#ifndef NIXOS_UTILS_H
+#define NIXOS_UTILS_H
+
+// kwin
+// #include <kwinglobals.h>
+
+namespace KWin
+{
+
+static QString unwrapExecutablePath(const QString &in_executablePath)
+{
+ // NixOS fixes many packaging issues through "wrapper" scripts that manipulates the environment or does
+ // miscellaneous trickeries and mischievous things to make the programs work.
+ // In turn, programs often employs different mischievous schemes and trickeries to do *other things.
+ // It often happens that they conflict.
+ // Here, `kwin` tries to detect the .desktop file for a given process.
+ // `kwin` followed the process `/proc/.../exe` up to the actual binary running.
+ // It normally would be fine, e.g. /usr/bin/foobar is what's in the desktop file.
+ // But it's not the truth here! It's extremely likely the resolved path is /nix/store/.../bin/.foobar-wrapped
+ // rather than what the desktop file points to, something like /nix/store/.../bin/foobar !!
+ // Since the wrappers for Nixpkgs *always* prepend a dot and append -wrapped, we assume here that we can keep
+ // `/^(.*)\/\.([^/]*)-wrapped/` until the (equivalent) regex does not match.
+ // This should canonicalize the wrapper name to the expected name to look for in the desktop file.
+
+ // Use a copy of the const string
+ QString executablePath(in_executablePath);
+
+ // While the parts needed are present, "unwrap" one layer of wrapper names.
+ while (executablePath.endsWith("-wrapped") && executablePath[executablePath.lastIndexOf("/")+1] == QChar('.')) {
+ // Approximately equivalent to s/-wrapped$//
+ executablePath.remove(executablePath.length() - 8, 8);
+ // Approximately equivalent to s;/\.;/;
+ executablePath.remove(executablePath.lastIndexOf("/")+1, 1);
+ }
+
+ return executablePath;
+}
+
+}// namespace
+
+#endif // NIXOS_UTILS_H
diff --git a/src/utils/serviceutils.h b/src/utils/serviceutils.h
index 8a70c1f..475b15d 100644
--- a/src/utils/serviceutils.h
+++ b/src/utils/serviceutils.h
@@ -19,6 +19,7 @@
#include <QLoggingCategory>
//KF
#include <KApplicationTrader>
+#include "nixos_utils.h"
namespace KWin
{
@@ -26,8 +27,9 @@ namespace KWin
const static QString s_waylandInterfaceName = QStringLiteral("X-KDE-Wayland-Interfaces");
const static QString s_dbusRestrictedInterfaceName = QStringLiteral("X-KDE-DBUS-Restricted-Interfaces");
-static QStringList fetchProcessServiceField(const QString &executablePath, const QString &fieldName)
+static QStringList fetchProcessServiceField(const QString &in_executablePath, const QString &fieldName)
{
+ const QString executablePath = unwrapExecutablePath(in_executablePath);
// needed to be able to use the logging category in a header static function
static QLoggingCategory KWIN_UTILS ("KWIN_UTILS", QtWarningMsg);
const auto servicesFound = KApplicationTrader::query([&executablePath] (const KService::Ptr &service) {
diff --git a/src/waylandwindow.cpp b/src/waylandwindow.cpp
index fd2c0c1..ae8cf96 100644
--- a/src/waylandwindow.cpp
+++ b/src/waylandwindow.cpp
@@ -10,6 +10,7 @@
#include "screens.h"
#include "wayland_server.h"
#include "workspace.h"
+#include "nixos_utils.h"
#include <KWaylandServer/display.h>
#include <KWaylandServer/clientbuffer.h>
@@ -173,7 +174,9 @@ void WaylandWindow::updateIcon()
void WaylandWindow::updateResourceName()
{
- const QFileInfo fileInfo(surface()->client()->executablePath());
+ const QString in_path = surface()->client()->executablePath();
+ const QString path = unwrapExecutablePath(in_path);
+ const QFileInfo fileInfo(path);
if (fileInfo.exists()) {
const QByteArray executableFileName = fileInfo.fileName().toUtf8();
setResourceClass(executableFileName, executableFileName);
--
2.32.0

View File

@@ -0,0 +1,44 @@
{
mkKdeDerivation,
pkg-config,
qt5compat,
qtsensors,
qttools,
qtwayland,
xorg,
libcanberra,
libdisplay-info,
libgbm,
lcms2,
python3,
}:
mkKdeDerivation {
pname = "kwin-x11";
patches = [
./0001-NixOS-Unwrap-executable-name-for-.desktop-search.patch
];
postPatch = ''
patchShebangs src/plugins/strip-effect-metadata.py
'';
extraNativeBuildInputs = [
pkg-config
python3
];
extraBuildInputs = [
qt5compat
qtsensors
qttools
qtwayland
libgbm
lcms2
libcanberra
libdisplay-info
xorg.libxcvt
];
}

View File

@@ -0,0 +1,40 @@
From 232e480ab1303f37d37d295b57fdcbb6b6648bca Mon Sep 17 00:00:00 2001
From: Alois Wohlschlager <alois1@gmx-topmail.de>
Date: Sun, 7 Aug 2022 16:12:31 +0200
Subject: [PATCH] Lower CAP_SYS_NICE from the ambient set
The capabilities wrapper raises CAP_SYS_NICE into the ambient set so it
is inherited by the wrapped program. However, we don't want it to leak
into the entire desktop environment.
Lower the capability again at startup so that the kernel will clear it
on exec.
---
src/main_wayland.cpp | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/main_wayland.cpp b/src/main_wayland.cpp
index 1720e14e7..f2bb446b0 100644
--- a/src/main_wayland.cpp
+++ b/src/main_wayland.cpp
@@ -39,7 +39,9 @@
#include <QWindow>
#include <qplatformdefs.h>
+#include <linux/capability.h>
#include <sched.h>
+#include <sys/prctl.h>
#include <sys/resource.h>
#include <iomanip>
@@ -285,6 +287,7 @@ static QString automaticBackendSelection()
int main(int argc, char *argv[])
{
+ prctl(PR_CAP_AMBIENT, PR_CAP_AMBIENT_LOWER, CAP_SYS_NICE, 0, 0);
KWin::Application::setupMalloc();
KWin::Application::setupLocalizedString();
KWin::gainRealTime();
--
2.37.1

View File

@@ -0,0 +1,114 @@
From 29ec6fada935ef966e5859082435ed57daa9522d Mon Sep 17 00:00:00 2001
From: Samuel Dionne-Riel <samuel@dionne-riel.com>
Date: Tue, 16 Mar 2021 15:03:59 -0400
Subject: [PATCH] [NixOS] Unwrap executable name for .desktop search
Why is this necessary even though -a "$0" is used in the wrapper?
Because it's completely bypassing argv0! This looks at the executable
file in-use according to the kernel!
Wrappers cannot affect the `/proc/.../exe` symlink!
Co-authored-by: Yaroslav Bolyukin <iam@lach.pw>
---
src/nixos_utils.h | 41 +++++++++++++++++++++++++++++++++++++++++
src/service_utils.h | 4 +++-
src/waylandwindow.cpp | 5 ++++-
3 files changed, 48 insertions(+), 2 deletions(-)
create mode 100644 src/nixos_utils.h
diff --git a/src/nixos_utils.h b/src/nixos_utils.h
new file mode 100644
index 0000000..726065d
--- /dev/null
+++ b/src/nixos_utils.h
@@ -0,0 +1,41 @@
+#ifndef NIXOS_UTILS_H
+#define NIXOS_UTILS_H
+
+// kwin
+// #include <kwinglobals.h>
+
+namespace KWin
+{
+
+static QString unwrapExecutablePath(const QString &in_executablePath)
+{
+ // NixOS fixes many packaging issues through "wrapper" scripts that manipulates the environment or does
+ // miscellaneous trickeries and mischievous things to make the programs work.
+ // In turn, programs often employs different mischievous schemes and trickeries to do *other things.
+ // It often happens that they conflict.
+ // Here, `kwin` tries to detect the .desktop file for a given process.
+ // `kwin` followed the process `/proc/.../exe` up to the actual binary running.
+ // It normally would be fine, e.g. /usr/bin/foobar is what's in the desktop file.
+ // But it's not the truth here! It's extremely likely the resolved path is /nix/store/.../bin/.foobar-wrapped
+ // rather than what the desktop file points to, something like /nix/store/.../bin/foobar !!
+ // Since the wrappers for Nixpkgs *always* prepend a dot and append -wrapped, we assume here that we can keep
+ // `/^(.*)\/\.([^/]*)-wrapped/` until the (equivalent) regex does not match.
+ // This should canonicalize the wrapper name to the expected name to look for in the desktop file.
+
+ // Use a copy of the const string
+ QString executablePath(in_executablePath);
+
+ // While the parts needed are present, "unwrap" one layer of wrapper names.
+ while (executablePath.endsWith("-wrapped") && executablePath[executablePath.lastIndexOf("/")+1] == QChar('.')) {
+ // Approximately equivalent to s/-wrapped$//
+ executablePath.remove(executablePath.length() - 8, 8);
+ // Approximately equivalent to s;/\.;/;
+ executablePath.remove(executablePath.lastIndexOf("/")+1, 1);
+ }
+
+ return executablePath;
+}
+
+}// namespace
+
+#endif // NIXOS_UTILS_H
diff --git a/src/utils/serviceutils.h b/src/utils/serviceutils.h
index 8a70c1f..475b15d 100644
--- a/src/utils/serviceutils.h
+++ b/src/utils/serviceutils.h
@@ -19,6 +19,7 @@
#include <QLoggingCategory>
//KF
#include <KApplicationTrader>
+#include "nixos_utils.h"
namespace KWin
{
@@ -26,8 +27,9 @@ namespace KWin
const static QString s_waylandInterfaceName = QStringLiteral("X-KDE-Wayland-Interfaces");
const static QString s_dbusRestrictedInterfaceName = QStringLiteral("X-KDE-DBUS-Restricted-Interfaces");
-static QStringList fetchProcessServiceField(const QString &executablePath, const QString &fieldName)
+static QStringList fetchProcessServiceField(const QString &in_executablePath, const QString &fieldName)
{
+ const QString executablePath = unwrapExecutablePath(in_executablePath);
// needed to be able to use the logging category in a header static function
static QLoggingCategory KWIN_UTILS ("KWIN_UTILS", QtWarningMsg);
const auto servicesFound = KApplicationTrader::query([&executablePath] (const KService::Ptr &service) {
diff --git a/src/waylandwindow.cpp b/src/waylandwindow.cpp
index fd2c0c1..ae8cf96 100644
--- a/src/waylandwindow.cpp
+++ b/src/waylandwindow.cpp
@@ -10,6 +10,7 @@
#include "screens.h"
#include "wayland_server.h"
#include "workspace.h"
+#include "nixos_utils.h"
#include <KWaylandServer/display.h>
#include <KWaylandServer/clientbuffer.h>
@@ -173,7 +174,9 @@ void WaylandWindow::updateIcon()
void WaylandWindow::updateResourceName()
{
- const QFileInfo fileInfo(surface()->client()->executablePath());
+ const QString in_path = surface()->client()->executablePath();
+ const QString path = unwrapExecutablePath(in_path);
+ const QFileInfo fileInfo(path);
if (fileInfo.exists()) {
const QByteArray executableFileName = fileInfo.fileName().toUtf8();
setResourceClass(executableFileName, executableFileName);
--
2.32.0

View File

@@ -0,0 +1,26 @@
From 8d49f5ef8692c352a62f4f8b1bc68e6e210bbee6 Mon Sep 17 00:00:00 2001
From: Yaroslav Bolyukin <iam@lach.pw>
Date: Wed, 23 Dec 2020 18:02:14 +0300
Subject: [PATCH 3/3] plugins/qpa: allow using nixos wrapper
Signed-off-by: Yaroslav Bolyukin <iam@lach.pw>
---
src/plugins/qpa/main.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/plugins/qpa/main.cpp b/src/plugins/qpa/main.cpp
index efd236b..a69c046 100644
--- a/src/plugins/qpa/main.cpp
+++ b/src/plugins/qpa/main.cpp
@@ -23,7 +23,7 @@ public:
QPlatformIntegration *KWinIntegrationPlugin::create(const QString &system, const QStringList &paramList)
{
- if (!QCoreApplication::applicationFilePath().endsWith(QLatin1String("kwin_wayland")) && !qEnvironmentVariableIsSet("KWIN_FORCE_OWN_QPA")) {
+ if (!QCoreApplication::applicationFilePath().endsWith(QLatin1String("kwin_wayland")) && !QCoreApplication::applicationFilePath().endsWith(QLatin1String(".kwin_wayland-wrapped")) && !qEnvironmentVariableIsSet("KWIN_FORCE_OWN_QPA")) {
// Not KWin
return nullptr;
}
--
2.29.2

View File

@@ -0,0 +1,65 @@
{
mkKdeDerivation,
pkg-config,
qtquick3d,
qtsensors,
qttools,
qtvirtualkeyboard,
qtwayland,
libinput,
xorg,
xwayland,
libcanberra,
libdisplay-info,
libei,
libgbm,
lcms2,
pipewire,
krunner,
python3,
}:
mkKdeDerivation {
pname = "kwin";
patches = [
./0003-plugins-qpa-allow-using-nixos-wrapper.patch
./0001-NixOS-Unwrap-executable-name-for-.desktop-search.patch
./0001-Lower-CAP_SYS_NICE-from-the-ambient-set.patch
];
postPatch = ''
patchShebangs src/plugins/strip-effect-metadata.py
'';
# TZDIR may be unset when running through the kwin_wayland wrapper,
# but we need it for the lockscreen clock to render
qtWrapperArgs = [
"--set-default TZDIR /etc/zoneinfo"
];
extraNativeBuildInputs = [
pkg-config
python3
];
extraBuildInputs = [
qtquick3d
qtsensors
qttools
qtvirtualkeyboard
qtwayland
krunner
libgbm
lcms2
libcanberra
libdisplay-info
libei
libinput
pipewire
xorg.libxcvt
# we need to provide this so it knows our xwayland supports new features
xwayland
];
}

View File

@@ -0,0 +1,5 @@
{ mkKdeDerivation }:
mkKdeDerivation {
pname = "kwrited";
meta.mainProgram = "kwrited";
}

View File

@@ -0,0 +1,11 @@
{
mkKdeDerivation,
qtwayland,
pkg-config,
}:
mkKdeDerivation {
pname = "layer-shell-qt";
extraNativeBuildInputs = [ pkg-config ];
extraBuildInputs = [ qtwayland ];
}

View File

@@ -0,0 +1,19 @@
{
mkKdeDerivation,
qtwayland,
qttools,
jq,
wayland,
}:
mkKdeDerivation {
pname = "libkscreen";
extraNativeBuildInputs = [
qttools
qtwayland
jq
wayland
];
extraBuildInputs = [ qtwayland ];
meta.mainProgram = "kscreen-doctor";
}

View File

@@ -0,0 +1,25 @@
{
mkKdeDerivation,
qtwebchannel,
qtwebengine,
qttools,
libpcap,
libnl,
lm_sensors,
}:
mkKdeDerivation {
pname = "libksysguard";
patches = [
./helper-path.patch
];
extraBuildInputs = [
qtwebchannel
qtwebengine
qttools
libpcap
libnl
lm_sensors
];
}

View File

@@ -0,0 +1,12 @@
diff --git a/processcore/plugins/network/networkconstants.h.in b/processcore/plugins/network/networkconstants.h.in
index f4556252..23559401 100644
--- a/processcore/plugins/network/networkconstants.h.in
+++ b/processcore/plugins/network/networkconstants.h.in
@@ -2,6 +2,6 @@
namespace NetworkConstants {
-static const QString HelperLocation = QStringLiteral("@KDE_INSTALL_FULL_LIBEXECDIR@/ksysguard/ksgrd_network_helper");
+static const QString HelperLocation = QStringLiteral("/run/wrappers/bin/ksgrd_network_helper");
}

View File

@@ -0,0 +1,18 @@
{
mkKdeDerivation,
qtsvg,
qtwayland,
wayland,
pkg-config,
}:
mkKdeDerivation {
pname = "libplasma";
extraNativeBuildInputs = [ pkg-config ];
extraBuildInputs = [
qtsvg
qtwayland
wayland
];
}

View File

@@ -0,0 +1,4 @@
{ mkKdeDerivation }:
mkKdeDerivation {
pname = "lightdm-greeter-kde";
}

View File

@@ -0,0 +1,4 @@
{ mkKdeDerivation }:
mkKdeDerivation {
pname = "milou";
}

View File

@@ -0,0 +1,4 @@
{ mkKdeDerivation }:
mkKdeDerivation {
pname = "ocean-sound-theme";
}

View File

@@ -0,0 +1,4 @@
{ mkKdeDerivation }:
mkKdeDerivation {
pname = "oxygen-sounds";
}

View File

@@ -0,0 +1,55 @@
{
mkKdeDerivation,
qtbase,
libsForQt5,
}:
mkKdeDerivation {
pname = "oxygen";
outputs = [
"out"
"dev"
"qt5"
];
# We can't add qt5 stuff to dependencies or the hooks blow up,
# so manually point everything to everything. Oof.
extraCmakeFlags = [
"-DQt5_DIR=${libsForQt5.qtbase.dev}/lib/cmake/Qt5"
"-DQt5Core_DIR=${libsForQt5.qtbase.dev}/lib/cmake/Qt5Core"
"-DQt5DBus_DIR=${libsForQt5.qtbase.dev}/lib/cmake/Qt5DBus"
"-DQt5Gui_DIR=${libsForQt5.qtbase.dev}/lib/cmake/Qt5Gui"
"-DQt5Network_DIR=${libsForQt5.qtbase.dev}/lib/cmake/Qt5Network"
"-DQt5Qml_DIR=${libsForQt5.qtdeclarative.dev}/lib/cmake/Qt5Qml"
"-DQt5QmlModels_DIR=${libsForQt5.qtdeclarative.dev}/lib/cmake/Qt5QmlModels"
"-DQt5Quick_DIR=${libsForQt5.qtdeclarative.dev}/lib/cmake/Qt5Quick"
"-DQt5Widgets_DIR=${libsForQt5.qtbase.dev}/lib/cmake/Qt5Widgets"
"-DQt5X11Extras_DIR=${libsForQt5.qtx11extras.dev}/lib/cmake/Qt5X11Extras"
"-DQt5Xml_DIR=${libsForQt5.qtbase.dev}/lib/cmake/Qt5Xml"
"-DKF5Auth_DIR=${libsForQt5.kauth.dev}/lib/cmake/KF5Auth"
"-DKF5Codecs_DIR=${libsForQt5.kcodecs.dev}/lib/cmake/KF5Codecs"
"-DKF5Config_DIR=${libsForQt5.kconfig.dev}/lib/cmake/KF5Config"
"-DKF5ConfigWidgets_DIR=${libsForQt5.kconfigwidgets.dev}/lib/cmake/KF5ConfigWidgets"
"-DKF5Completion_DIR=${libsForQt5.kcompletion.dev}/lib/cmake/KF5Completion"
"-DKF5CoreAddons_DIR=${libsForQt5.kcoreaddons.dev}/lib/cmake/KF5CoreAddons"
"-DKF5FrameworkIntegration_DIR=${libsForQt5.frameworkintegration.dev}/lib/cmake/KF5FrameworkIntegration"
"-DKF5GuiAddons_DIR=${libsForQt5.kguiaddons.dev}/lib/cmake/KF5GuiAddons"
"-DKF5IconThemes_DIR=${libsForQt5.kiconthemes.dev}/lib/cmake/KF5IconThemes"
"-DKF5I18n_DIR=${libsForQt5.ki18n.dev}/lib/cmake/KF5I18n"
"-DKF5Kirigami2_DIR=${libsForQt5.kirigami2.dev}/lib/cmake/KF5Kirigami2"
"-DKF5Service_DIR=${libsForQt5.kservice.dev}/lib/cmake/KF5Service"
"-DKF5WidgetsAddons_DIR=${libsForQt5.kwidgetsaddons.dev}/lib/cmake/KF5WidgetsAddons"
"-DKF5WindowSystem_DIR=${libsForQt5.kwindowsystem.dev}/lib/cmake/KF5WindowSystem"
];
# Move Qt5 plugin to Qt5 plugin path
postInstall = ''
mkdir -p $qt5/${libsForQt5.qtbase.qtPluginPrefix}/styles
mv $out/${qtbase.qtPluginPrefix}/styles/oxygen5.so $qt5/${libsForQt5.qtbase.qtPluginPrefix}/styles
moveToOutput bin/oxygen-demo5 $qt5
moveToOutput 'lib/liboxygenstyle5*' $qt5
moveToOutput 'lib/liboxygenstyleconfig5*' $qt5
'';
}

View File

@@ -0,0 +1,4 @@
{ mkKdeDerivation }:
mkKdeDerivation {
pname = "plasma-activities-stats";
}

View File

@@ -0,0 +1,14 @@
{
mkKdeDerivation,
qtdeclarative,
boost,
}:
mkKdeDerivation {
pname = "plasma-activities";
extraBuildInputs = [
qtdeclarative
boost
];
meta.mainProgram = "plasma-activities-cli6";
}

View File

@@ -0,0 +1,5 @@
{ mkKdeDerivation }:
mkKdeDerivation {
pname = "plasma-browser-integration";
meta.mainProgram = "plasma-browser-integration-host";
}

View File

@@ -0,0 +1,69 @@
{
lib,
mkKdeDerivation,
runCommandLocal,
makeWrapper,
glib,
gsettings-desktop-schemas,
replaceVars,
util-linux,
pkg-config,
qtsvg,
qtwayland,
breeze,
SDL2,
xkeyboard_config,
xorg,
libcanberra,
libwacom,
libxkbfile,
ibus,
}:
let
# run gsettings with desktop schemas for using in "kcm_access" kcm
# and in kaccess
gsettings-wrapper = runCommandLocal "gsettings-wrapper" { nativeBuildInputs = [ makeWrapper ]; } ''
mkdir -p $out/bin
makeWrapper ${glib}/bin/gsettings $out/bin/gsettings --prefix XDG_DATA_DIRS : ${gsettings-desktop-schemas.out}/share/gsettings-schemas/${gsettings-desktop-schemas.name}
'';
in
mkKdeDerivation {
pname = "plasma-desktop";
patches = [
(replaceVars ./hwclock-path.patch {
hwclock = "${lib.getBin util-linux}/bin/hwclock";
})
(replaceVars ./kcm-access.patch {
gsettings = "${gsettings-wrapper}/bin/gsettings";
})
./tzdir.patch
./no-discover-shortcut.patch
(replaceVars ./wallpaper-paths.patch {
wallpapers = "${lib.getBin breeze}/share/wallpapers";
})
];
extraNativeBuildInputs = [ pkg-config ];
extraBuildInputs = [
qtsvg
qtwayland
SDL2
libcanberra
libwacom
libxkbfile
xkeyboard_config
xorg.libXcursor
xorg.libXft
xorg.xf86inputlibinput
xorg.xf86inputevdev
xorg.xorgserver
ibus
];
# wrap kaccess with wrapped gsettings so it can access accessibility schemas
qtWrapperArgs = [ "--prefix PATH : ${lib.makeBinPath [ gsettings-wrapper ]}" ];
}

View File

@@ -0,0 +1,24 @@
Index: plasma-desktop-5.8.5/kcms/dateandtime/helper.cpp
===================================================================
--- plasma-desktop-5.8.5.orig/kcms/dateandtime/helper.cpp
+++ plasma-desktop-5.8.5/kcms/dateandtime/helper.cpp
@@ -48,10 +48,6 @@
#include <sys/types.h>
#endif
-// We cannot rely on the $PATH environment variable, because D-Bus activation
-// clears it. So we have to use a reasonable default.
-static const QString exePath = QStringLiteral("/usr/sbin:/usr/bin:/sbin:/bin");
-
int ClockHelper::ntp(const QStringList &ntpServers, bool ntpEnabled)
{
int ret = 0;
@@ -227,7 +223,7 @@ int ClockHelper::tzreset()
void ClockHelper::toHwclock()
{
- QString hwclock = QStandardPaths::findExecutable(QStringLiteral("hwclock"), exePath.split(QLatin1Char(':')));
+ QString hwclock = QLatin1String("@hwclock@");
if (!hwclock.isEmpty()) {
KProcess::execute(hwclock, QStringList() << QStringLiteral("--systohc"));
}

View File

@@ -0,0 +1,13 @@
diff --git a/kcms/access/kcmaccess.cpp b/kcms/access/kcmaccess.cpp
index 4f8d3e2..a96f755 100644
--- a/kcms/access/kcmaccess.cpp
+++ b/kcms/access/kcmaccess.cpp
@@ -176,7 +176,7 @@ void KAccessConfig::launchOrcaConfiguration()
QStringLiteral("screen-reader-enabled"),
QStringLiteral("true")};
- int ret = QProcess::execute(QStringLiteral("gsettings"), gsettingArgs);
+ int ret = QProcess::execute(QStringLiteral("@gsettings@"), gsettingArgs);
if (ret) {
const QString errorStr = QLatin1String("gsettings ") + gsettingArgs.join(QLatin1Char(' '));
setOrcaLaunchFeedback(i18n("Could not set gsettings for Orca: \"%1\" failed", errorStr));

View File

@@ -0,0 +1,13 @@
diff --git a/applets/taskmanager/package/contents/config/main.xml b/applets/taskmanager/package/contents/config/main.xml
index 6bb27695d..25e621810 100644
--- a/applets/taskmanager/package/contents/config/main.xml
+++ b/applets/taskmanager/package/contents/config/main.xml
@@ -85,7 +85,7 @@
</entry>
<entry name="launchers" type="StringList">
<label>The list of launcher tasks on the widget. Usually .desktop file or executable URLs. Special URLs such as preferred://browser that expand to default applications are supported.</label>
- <default>applications:systemsettings.desktop,applications:org.kde.discover.desktop,preferred://filemanager,preferred://browser</default>
+ <default>applications:systemsettings.desktop,preferred://filemanager,preferred://browser</default>
</entry>
<entry name="middleClickAction" type="Enum">
<label>What to do on middle-mouse click on a task button.</label>

View File

@@ -0,0 +1,18 @@
Index: plasma-desktop-5.8.5/kcms/dateandtime/helper.cpp
===================================================================
--- plasma-desktop-5.8.5.orig/kcms/dateandtime/helper.cpp
+++ plasma-desktop-5.8.5/kcms/dateandtime/helper.cpp
@@ -181,7 +181,12 @@ int ClockHelper::tz( const QString& sele
val = selectedzone;
#else
- QString tz = "/usr/share/zoneinfo/" + selectedzone;
+ QString tzdir = QString::fromLocal8Bit(qgetenv("TZDIR"));
+ QString tz = tzdir + "/" + selectedzone;
+ if (tzdir.isEmpty()) {
+ // Standard Linux path
+ tz = "/usr/share/zoneinfo/" + selectedzone;
+ }
if (QFile::exists(tz)) { // make sure the new TZ really exists
QFile::remove(QStringLiteral("/etc/localtime"));

View File

@@ -0,0 +1,9 @@
--- a/sddm-theme/theme.conf.cmake
+++ b/sddm-theme/theme.conf.cmake
@@ -4,5 +4,5 @@ logo=${KDE_INSTALL_FULL_DATADIR}/sddm/themes/breeze/default-logo.svg
type=image
color=#1d99f3
fontSize=10
-background=${KDE_INSTALL_FULL_WALLPAPERDIR}/Next/contents/images/5120x2880.png
+background=@wallpapers@/Next/contents/images/5120x2880.png
needsFullUserModel=false

View File

@@ -0,0 +1,23 @@
{
mkKdeDerivation,
pkg-config,
qtwayland,
callaudiod,
libphonenumber,
protobuf,
}:
mkKdeDerivation {
pname = "plasma-dialer";
extraNativeBuildInputs = [ pkg-config ];
extraBuildInputs = [
qtwayland
callaudiod
libphonenumber
protobuf
];
extraCmakeFlags = [
"-DQtWaylandScanner_EXECUTABLE=${qtwayland}/libexec/qtwaylandscanner"
];
}

View File

@@ -0,0 +1,15 @@
{
mkKdeDerivation,
lib,
replaceVars,
smartmontools,
}:
mkKdeDerivation {
pname = "plasma-disks";
patches = [
(replaceVars ./smartctl-path.patch {
smartctl = lib.getExe smartmontools;
})
];
}

View File

@@ -0,0 +1,13 @@
diff --git a/src/helper.cpp b/src/helper.cpp
index 102ebc5..4cde9da 100644
--- a/src/helper.cpp
+++ b/src/helper.cpp
@@ -69,7 +69,7 @@ ActionReply SMARTHelper::smartctl(const QVariantMap &args)
// PATH is super minimal when invoked through dbus
setenv("PATH", "/usr/sbin:/sbin:/usr/local/sbin", 1);
- const QString command = QStringLiteral("smartctl");
+ const QString command = QStringLiteral("@smartctl@");
const QString all = QStringLiteral("--all");
// JSON output.

View File

@@ -0,0 +1,4 @@
{ mkKdeDerivation }:
mkKdeDerivation {
pname = "plasma-firewall";
}

View File

@@ -0,0 +1,74 @@
{
mkKdeDerivation,
qtbase,
qtwayland,
libsForQt5,
xorg,
}:
mkKdeDerivation {
pname = "plasma-integration";
# force it to check our custom import path too
patches = [ ./qml-path.patch ];
outputs = [
"out"
"dev"
"qt5"
];
# We can't add qt5 stuff to dependencies or the hooks blow up,
# so manually point everything to everything. Oof.
extraCmakeFlags = [
"-DQt5_DIR=${libsForQt5.qtbase.dev}/lib/cmake/Qt5"
"-DQt5Concurrent_DIR=${libsForQt5.qtbase.dev}/lib/cmake/Qt5Concurrent"
"-DQt5Core_DIR=${libsForQt5.qtbase.dev}/lib/cmake/Qt5Core"
"-DQt5DBus_DIR=${libsForQt5.qtbase.dev}/lib/cmake/Qt5DBus"
"-DQt5Gui_DIR=${libsForQt5.qtbase.dev}/lib/cmake/Qt5Gui"
"-DQt5Network_DIR=${libsForQt5.qtbase.dev}/lib/cmake/Qt5Network"
"-DQt5Qml_DIR=${libsForQt5.qtdeclarative.dev}/lib/cmake/Qt5Qml"
"-DQt5QmlModels_DIR=${libsForQt5.qtdeclarative.dev}/lib/cmake/Qt5QmlModels"
"-DQt5Quick_DIR=${libsForQt5.qtdeclarative.dev}/lib/cmake/Qt5Quick"
"-DQt5QuickControls2_DIR=${libsForQt5.qtquickcontrols2.dev}/lib/cmake/Qt5QuickControls2"
"-DQt5ThemeSupport_LIBRARY=${libsForQt5.qtbase.out}/lib/libQt5ThemeSupport.a"
"-DQt5ThemeSupport_INCLUDE_DIR=${libsForQt5.qtbase.dev}/include/QtThemeSupport/${libsForQt5.qtbase.version}"
"-DQt5WaylandClient_DIR=${libsForQt5.qtwayland.dev}/lib/cmake/Qt5WaylandClient"
"-DQt5WaylandScanner_EXECUTABLE=${libsForQt5.qtwayland.dev}/bin/qtwaylandscanner"
"-DQt5Widgets_DIR=${libsForQt5.qtbase.dev}/lib/cmake/Qt5Widgets"
"-DQt5X11Extras_DIR=${libsForQt5.qtx11extras.dev}/lib/cmake/Qt5X11Extras"
"-DQt5Xml_DIR=${libsForQt5.qtbase.dev}/lib/cmake/Qt5Xml"
"-DQtWaylandScanner_EXECUTABLE=${libsForQt5.qtwayland.dev}/bin/qtwaylandscanner"
"-DKF5Auth_DIR=${libsForQt5.kauth.dev}/lib/cmake/KF5Auth"
"-DKF5Bookmarks_DIR=${libsForQt5.kbookmarks.dev}/lib/cmake/KF5Bookmarks"
"-DKF5Codecs_DIR=${libsForQt5.kcodecs.dev}/lib/cmake/KF5Codecs"
"-DKF5Completion_DIR=${libsForQt5.kcompletion.dev}/lib/cmake/KF5Completion"
"-DKF5Config_DIR=${libsForQt5.kconfig.dev}/lib/cmake/KF5Config"
"-DKF5ConfigWidgets_DIR=${libsForQt5.kconfigwidgets.dev}/lib/cmake/KF5ConfigWidgets"
"-DKF5CoreAddons_DIR=${libsForQt5.kcoreaddons.dev}/lib/cmake/KF5CoreAddons"
"-DKF5GuiAddons_DIR=${libsForQt5.kguiaddons.dev}/lib/cmake/KF5GuiAddons"
"-DKF5I18n_DIR=${libsForQt5.ki18n.dev}/lib/cmake/KF5I18n"
"-DKF5IconThemes_DIR=${libsForQt5.kiconthemes.dev}/lib/cmake/KF5IconThemes"
"-DKF5ItemViews_DIR=${libsForQt5.kitemviews.dev}/lib/cmake/KF5ItemViews"
"-DKF5JobWidgets_DIR=${libsForQt5.kjobwidgets.dev}/lib/cmake/KF5JobWidgets"
"-DKF5KIO_DIR=${libsForQt5.kio.dev}/lib/cmake/KF5KIO"
"-DKF5Notifications_DIR=${libsForQt5.knotifications.dev}/lib/cmake/KF5Notifications"
"-DKF5Service_DIR=${libsForQt5.kservice.dev}/lib/cmake/KF5Service"
"-DKF5Solid_DIR=${libsForQt5.solid.dev}/lib/cmake/KF5Solid"
"-DKF5Wayland_DIR=${libsForQt5.kwayland.dev}/lib/cmake/KF5Wayland"
"-DKF5WidgetsAddons_DIR=${libsForQt5.kwidgetsaddons.dev}/lib/cmake/KF5WidgetsAddons"
"-DKF5WindowSystem_DIR=${libsForQt5.kwindowsystem.dev}/lib/cmake/KF5WindowSystem"
"-DKF5XmlGui_DIR=${libsForQt5.kxmlgui.dev}/lib/cmake/KF5XmlGui"
];
extraBuildInputs = [
qtwayland
xorg.libXcursor
];
# Move Qt5 plugin to Qt5 plugin path
postInstall = ''
mkdir -p $qt5/${libsForQt5.qtbase.qtPluginPrefix}/platformthemes
mv $out/${qtbase.qtPluginPrefix}/platformthemes/KDEPlasmaPlatformTheme5.so $qt5/${libsForQt5.qtbase.qtPluginPrefix}/platformthemes
'';
}

View File

@@ -0,0 +1,12 @@
diff --git a/qt6/src/platformtheme/kdeplatformtheme.cpp b/qt6/src/platformtheme/kdeplatformtheme.cpp
index fea04b5..7efafd1 100644
--- a/qt6/src/platformtheme/kdeplatformtheme.cpp
+++ b/qt6/src/platformtheme/kdeplatformtheme.cpp
@@ -551,6 +551,7 @@ bool KdePlatformTheme::checkIfThemeExists(const QString &themePath)
// QML_IMPORT_PATH is the new one, but QML2_IMPORT_PATH is still used
checkEnvironmentVariable("QML2_IMPORT_PATH");
checkEnvironmentVariable("QML_IMPORT_PATH");
+ checkEnvironmentVariable("NIXPKGS_QT6_QML_IMPORT_PATH");
for (const QString &path : moduleSearchPaths) {
if (QDir(path + themePath).exists()) {

View File

@@ -0,0 +1,23 @@
{
mkKdeDerivation,
pkg-config,
qtsensors,
qtwayland,
plasma-workspace,
}:
mkKdeDerivation {
pname = "plasma-mobile";
extraNativeBuildInputs = [ pkg-config ];
extraBuildInputs = [
qtsensors
qtwayland
];
postFixup = ''
substituteInPlace "$out/share/wayland-sessions/plasma-mobile.desktop" \
--replace-fail \
"$out/libexec/plasma-dbus-run-session-if-needed" \
"${plasma-workspace}/libexec/plasma-dbus-run-session-if-needed"
'';
passthru.providedSessions = [ "plasma-mobile" ];
}

View File

@@ -0,0 +1,9 @@
{
mkKdeDerivation,
qtsvg,
}:
mkKdeDerivation {
pname = "plasma-nano";
extraBuildInputs = [ qtsvg ];
}

View File

@@ -0,0 +1,13 @@
diff --git a/vpn/openvpn/openvpnadvancedwidget.cpp b/vpn/openvpn/openvpnadvancedwidget.cpp
index 2f11ba1d..310f11b4 100644
--- a/vpn/openvpn/openvpnadvancedwidget.cpp
+++ b/vpn/openvpn/openvpnadvancedwidget.cpp
@@ -75,7 +75,7 @@ OpenVpnAdvancedWidget::OpenVpnAdvancedWidget(const NetworkManager::VpnSetting::P
connect(m_ui->cmbProxyType, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this, &OpenVpnAdvancedWidget::proxyTypeChanged);
// start openVPN process and get its cipher list
- const QString openVpnBinary = QStandardPaths::findExecutable("openvpn", QStringList{"/sbin", "/usr/sbin"});
+ const QString openVpnBinary = "@openvpn@/bin/openvpn";
const QStringList ciphersArgs(QLatin1String("--show-ciphers"));
const QStringList versionArgs(QLatin1String("--version"));

View File

@@ -0,0 +1,25 @@
{
mkKdeDerivation,
replaceVars,
pkg-config,
qtwebengine,
mobile-broadband-provider-info,
openconnect,
openvpn,
}:
mkKdeDerivation {
pname = "plasma-nm";
patches = [
(replaceVars ./0002-openvpn-binary-path.patch {
inherit openvpn;
})
];
extraNativeBuildInputs = [ pkg-config ];
extraBuildInputs = [
qtwebengine
mobile-broadband-provider-info
openconnect
];
}

View File

@@ -0,0 +1,15 @@
{
mkKdeDerivation,
pkg-config,
libcanberra,
pulseaudio,
}:
mkKdeDerivation {
pname = "plasma-pa";
extraNativeBuildInputs = [ pkg-config ];
extraBuildInputs = [
libcanberra
pulseaudio
];
}

View File

@@ -0,0 +1,9 @@
{
mkKdeDerivation,
qtsvg,
}:
mkKdeDerivation {
pname = "plasma-sdk";
extraBuildInputs = [ qtsvg ];
}

View File

@@ -0,0 +1,5 @@
{ mkKdeDerivation }:
mkKdeDerivation {
pname = "plasma-systemmonitor";
meta.mainProgram = "plasma-systemmonitor";
}

View File

@@ -0,0 +1,4 @@
{ mkKdeDerivation }:
mkKdeDerivation {
pname = "plasma-thunderbolt";
}

View File

@@ -0,0 +1,31 @@
From fef6bfe87db4411e3dda2f96741cd8204fe41d85 Mon Sep 17 00:00:00 2001
From: Thomas Tuegel <ttuegel@mailbox.org>
Date: Tue, 2 Nov 2021 05:57:50 -0500
Subject: [PATCH 1/3] encfs path
---
kded/engine/backends/encfs/encfsbackend.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/kded/engine/backends/encfs/encfsbackend.cpp b/kded/engine/backends/encfs/encfsbackend.cpp
index 2d15fa2..3f49867 100644
--- a/kded/engine/backends/encfs/encfsbackend.cpp
+++ b/kded/engine/backends/encfs/encfsbackend.cpp
@@ -101,12 +101,12 @@ QProcess *EncFsBackend::encfs(const QStringList &arguments) const
auto config = KSharedConfig::openConfig(PLASMAVAULT_CONFIG_FILE);
KConfigGroup backendConfig(config, "EncfsBackend");
- return process("encfs", arguments + backendConfig.readEntry("extraMountOptions", QStringList{}), {});
+ return process(NIXPKGS_ENCFS, arguments + backendConfig.readEntry("extraMountOptions", QStringList{}), {});
}
QProcess *EncFsBackend::encfsctl(const QStringList &arguments) const
{
- return process("encfsctl", arguments, {});
+ return process(NIXPKGS_ENCFSCTL, arguments, {});
}
} // namespace PlasmaVault
--
2.33.1

View File

@@ -0,0 +1,25 @@
From a89a0d3f9088d272c01ccb9b730d1dbb500f9cb8 Mon Sep 17 00:00:00 2001
From: Thomas Tuegel <ttuegel@mailbox.org>
Date: Tue, 2 Nov 2021 05:59:34 -0500
Subject: [PATCH 2/3] cryfs path
---
kded/engine/backends/cryfs/cryfsbackend.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kded/engine/backends/cryfs/cryfsbackend.cpp b/kded/engine/backends/cryfs/cryfsbackend.cpp
index 64138b6..1a9fde2 100644
--- a/kded/engine/backends/cryfs/cryfsbackend.cpp
+++ b/kded/engine/backends/cryfs/cryfsbackend.cpp
@@ -207,7 +207,7 @@ QProcess *CryFsBackend::cryfs(const QStringList &arguments) const
auto config = KSharedConfig::openConfig(PLASMAVAULT_CONFIG_FILE);
KConfigGroup backendConfig(config, "CryfsBackend");
- return process("cryfs", arguments + backendConfig.readEntry("extraMountOptions", QStringList{}), {{"CRYFS_FRONTEND", "noninteractive"}});
+ return process(NIXPKGS_CRYFS, arguments + backendConfig.readEntry("extraMountOptions", QStringList{}), {{"CRYFS_FRONTEND", "noninteractive"}});
}
} // namespace PlasmaVault
--
2.33.1

View File

@@ -0,0 +1,25 @@
From 63571e28c65935f32567c0b179a096d62726b778 Mon Sep 17 00:00:00 2001
From: Thomas Tuegel <ttuegel@mailbox.org>
Date: Tue, 2 Nov 2021 06:00:32 -0500
Subject: [PATCH 3/3] fusermount path
---
kded/engine/fusebackend_p.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kded/engine/fusebackend_p.cpp b/kded/engine/fusebackend_p.cpp
index 91f3523..1c19d88 100644
--- a/kded/engine/fusebackend_p.cpp
+++ b/kded/engine/fusebackend_p.cpp
@@ -86,7 +86,7 @@ QProcess *FuseBackend::process(const QString &executable, const QStringList &arg
QProcess *FuseBackend::fusermount(const QStringList &arguments) const
{
- return process("fusermount", arguments, {});
+ return process(NIXPKGS_FUSERMOUNT, arguments, {});
}
FutureResult<> FuseBackend::initialize(const QString &name, const Device &device, const MountPoint &mountPoint, const Vault::Payload &payload)
--
2.33.1

View File

@@ -0,0 +1,13 @@
diff --git a/kded/engine/backends/gocryptfs/gocryptfsbackend.cpp b/kded/engine/backends/gocryptfs/gocryptfsbackend.cpp
index 2d6df94..3e8ec9a 100644
--- a/kded/engine/backends/gocryptfs/gocryptfsbackend.cpp
+++ b/kded/engine/backends/gocryptfs/gocryptfsbackend.cpp
@@ -202,7 +202,7 @@ QProcess *GocryptfsBackend::gocryptfs(const QStringList &arguments) const
auto config = KSharedConfig::openConfig(PLASMAVAULT_CONFIG_FILE);
KConfigGroup backendConfig(config, "GocryptfsBackend");
- return process("gocryptfs", arguments + backendConfig.readEntry("extraMountOptions", QStringList{}), {});
+ return process(NIXPKGS_GOCRYPTFS, arguments + backendConfig.readEntry("extraMountOptions", QStringList{}), {});
}
QString GocryptfsBackend::getConfigFilePath(const Device &device) const

View File

@@ -0,0 +1,29 @@
{
lib,
mkKdeDerivation,
pkg-config,
gocryptfs,
fuse,
cryfs,
encfs,
}:
mkKdeDerivation {
pname = "plasma-vault";
patches = [
./0001-encfs-path.patch
./0002-cryfs-path.patch
./0003-fusermount-path.patch
./0004-gocryptfs-path.patch
];
CXXFLAGS = [
''-DNIXPKGS_ENCFS=\"${lib.getBin encfs}/bin/encfs\"''
''-DNIXPKGS_ENCFSCTL=\"${lib.getBin encfs}/bin/encfsctl\"''
''-DNIXPKGS_CRYFS=\"${lib.getBin cryfs}/bin/cryfs\"''
''-DNIXPKGS_FUSERMOUNT=\"${lib.getBin fuse}/bin/fusermount\"''
''-DNIXPKGS_GOCRYPTFS=\"${lib.getBin gocryptfs}/bin/gocryptfs\"''
];
extraNativeBuildInputs = [ pkg-config ];
}

View File

@@ -0,0 +1,10 @@
{
mkKdeDerivation,
qtsvg,
}:
mkKdeDerivation {
pname = "plasma-welcome";
extraBuildInputs = [ qtsvg ];
meta.mainProgram = "plasma-welcome";
}

View File

@@ -0,0 +1,9 @@
{
mkKdeDerivation,
extra-cmake-modules,
}:
mkKdeDerivation {
pname = "plasma-workspace-wallpapers";
extraBuildInputs = [ extra-cmake-modules ];
}

View File

@@ -0,0 +1,86 @@
{
lib,
mkKdeDerivation,
replaceVars,
fetchpatch,
dbus,
fontconfig,
xorg,
lsof,
pkg-config,
spirv-tools,
qtlocation,
qtpositioning,
qtsvg,
qtwayland,
libcanberra,
libqalculate,
pipewire,
qttools,
qqc2-breeze-style,
gpsd,
}:
mkKdeDerivation {
pname = "plasma-workspace";
patches = [
(replaceVars ./dependency-paths.patch {
dbusSend = lib.getExe' dbus "dbus-send";
fcMatch = lib.getExe' fontconfig "fc-match";
lsof = lib.getExe lsof;
qdbus = lib.getExe' qttools "qdbus";
xmessage = lib.getExe xorg.xmessage;
xrdb = lib.getExe xorg.xrdb;
# @QtBinariesDir@ only appears in the *removed* lines of the diff
QtBinariesDir = null;
})
# Fixes https://github.com/NixOS/nixpkgs/issues/442630, next upstream release should already contain this patch
(fetchpatch {
name = "fix-media-applet-crash.diff";
url = "https://invent.kde.org/plasma/plasma-workspace/-/commit/30273fb2afcc6e304951c8895bb17d38255fed39.diff";
sha256 = "sha256-1p1CjxRioCDm5ugoI8l6kDlOse5FbDJ71tTAY9LPvRc=";
})
];
postInstall = ''
# Prevent patching this shell file, it only is used by sourcing it from /bin/sh.
chmod -x $out/libexec/plasma-sourceenv.sh
'';
extraNativeBuildInputs = [
pkg-config
spirv-tools
];
extraBuildInputs = [
qtlocation
qtpositioning
qtsvg
qtwayland
qqc2-breeze-style
libcanberra
libqalculate
pipewire
xorg.libSM
xorg.libXcursor
xorg.libXtst
xorg.libXft
gpsd
];
qtWrapperArgs = [ "--inherit-argv0" ];
# Hardcoded as QStrings, which are UTF-16 so Nix can't pick these up automatically
postFixup = ''
mkdir -p $out/nix-support
echo "${lsof} ${xorg.xmessage} ${xorg.xrdb}" > $out/nix-support/depends
'';
passthru.providedSessions = [
"plasma"
"plasmax11"
];
}

View File

@@ -0,0 +1,141 @@
diff --git a/applets/devicenotifier/plugin/deviceerrormonitor_p.cpp b/applets/devicenotifier/plugin/deviceerrormonitor_p.cpp
index ba214a555d..421d940738 100644
--- a/applets/devicenotifier/plugin/deviceerrormonitor_p.cpp
+++ b/applets/devicenotifier/plugin/deviceerrormonitor_p.cpp
@@ -155,7 +155,7 @@ void DeviceErrorMonitor::queryBlockingApps(const QString &devicePath)
Q_EMIT blockingAppsReady(blockApps);
p->deleteLater();
});
- p->start(QStringLiteral("lsof"), {QStringLiteral("-t"), devicePath});
+ p->start(QStringLiteral("@lsof@"), {QStringLiteral("-t"), devicePath});
// p.start(QStringLiteral("fuser"), {QStringLiteral("-m"), devicePath});
}
diff --git a/kcms/fonts/fontinit.cpp b/kcms/fonts/fontinit.cpp
index e27e21a7bd..abbf7f32e1 100644
--- a/kcms/fonts/fontinit.cpp
+++ b/kcms/fonts/fontinit.cpp
@@ -27,7 +27,7 @@ Q_DECL_EXPORT void kcminit()
const QByteArray input = "Xft.dpi: " + QByteArray::number(dpi);
QProcess p;
- p.start(QStringLiteral("xrdb"), {QStringLiteral("-quiet"), QStringLiteral("-merge"), QStringLiteral("-nocpp")});
+ p.start(QStringLiteral("@xrdb@"), {QStringLiteral("-quiet"), QStringLiteral("-merge"), QStringLiteral("-nocpp")});
p.setProcessChannelMode(QProcess::ForwardedChannels);
p.write(input);
p.closeWriteChannel();
diff --git a/kcms/fonts/fonts.cpp b/kcms/fonts/fonts.cpp
index 96417c440a..8c9bc2e9ab 100644
--- a/kcms/fonts/fonts.cpp
+++ b/kcms/fonts/fonts.cpp
@@ -137,7 +137,7 @@ void KFonts::save()
if (fontsAASettings()->forceFontDPI() == 0 && forceFontDPIChanged && KWindowSystem::isPlatformX11()) {
QProcess proc;
proc.setProcessChannelMode(QProcess::ForwardedChannels);
- proc.start(u"xrdb"_s, QStringList{u"-quiet"_s, u"-remove"_s, u"-nocpp"_s});
+ proc.start(u"@xrdb@"_s, QStringList{u"-quiet"_s, u"-remove"_s, u"-nocpp"_s});
if (proc.waitForStarted()) {
proc.write("Xft.dpi\n");
proc.closeWriteChannel();
diff --git a/kcms/kfontinst/kcmfontinst/FcQuery.cpp b/kcms/kfontinst/kcmfontinst/FcQuery.cpp
index e4d1ad4311..d45bdfad98 100644
--- a/kcms/kfontinst/kcmfontinst/FcQuery.cpp
+++ b/kcms/kfontinst/kcmfontinst/FcQuery.cpp
@@ -46,7 +46,7 @@ void CFcQuery::run(const QString &query)
connect(m_proc, SIGNAL(finished(int, QProcess::ExitStatus)), SLOT(procExited()));
connect(m_proc, &QProcess::readyReadStandardOutput, this, &CFcQuery::data);
- m_proc->start(u"fc-match"_s, args);
+ m_proc->start(u"@fcMatch@"_s, args);
}
void CFcQuery::procExited()
diff --git a/kcms/krdb/krdb.cpp b/kcms/krdb/krdb.cpp
index f3c9956921..09c818739d 100644
--- a/kcms/krdb/krdb.cpp
+++ b/kcms/krdb/krdb.cpp
@@ -425,7 +425,7 @@ void runRdb(unsigned int flags)
contents += "Xft.dpi: "_L1 + QString::number(dpi) + u'\n';
else {
KProcess queryProc;
- queryProc << QStringLiteral("xrdb") << QStringLiteral("-query");
+ queryProc << QStringLiteral("@xrdb@") << QStringLiteral("-query");
queryProc.setOutputChannelMode(KProcess::OnlyStdoutChannel);
queryProc.start();
if (queryProc.waitForFinished()) {
@@ -445,7 +445,7 @@ void runRdb(unsigned int flags)
}
KProcess loadProc;
- loadProc << QStringLiteral("xrdb") << QStringLiteral("-quiet") << QStringLiteral("-load") << QStringLiteral("-nocpp");
+ loadProc << QStringLiteral("@xrdb@") << QStringLiteral("-quiet") << QStringLiteral("-load") << QStringLiteral("-nocpp");
loadProc.start();
if (loadProc.waitForStarted()) {
loadProc.write(db);
@@ -463,9 +463,9 @@ void runRdb(unsigned int flags)
KProcess proc;
#ifndef NDEBUG
- proc << QStringLiteral("xrdb") << QStringLiteral("-merge") << tmpFile.fileName();
+ proc << QStringLiteral("@xrdb@") << QStringLiteral("-merge") << tmpFile.fileName();
#else
- proc << u"xrdb"_s << u"-quiet"_s << u"-merge"_s << tmpFile.fileName();
+ proc << u"@xrdb@"_s << u"-quiet"_s << u"-merge"_s << tmpFile.fileName();
#endif
proc.execute();
diff --git a/ksmserver/plasma-restoresession.service.in b/ksmserver/plasma-restoresession.service.in
index 2c52a4b87d..fd7fdc8ac1 100644
--- a/ksmserver/plasma-restoresession.service.in
+++ b/ksmserver/plasma-restoresession.service.in
@@ -5,5 +5,5 @@ RefuseManualStart=yes
[Service]
Type=oneshot
-ExecStart=-@QtBinariesDir@/qdbus org.kde.ksmserver /KSMServer org.kde.KSMServerInterface.restoreSession
+ExecStart=-@qdbus@ org.kde.ksmserver /KSMServer org.kde.KSMServerInterface.restoreSession
Slice=session.slice
diff --git a/startkde/kcminit/plasma-kcminit-phase1.service.in b/startkde/kcminit/plasma-kcminit-phase1.service.in
index 7218628ce9..9126475ea4 100644
--- a/startkde/kcminit/plasma-kcminit-phase1.service.in
+++ b/startkde/kcminit/plasma-kcminit-phase1.service.in
@@ -6,5 +6,5 @@ PartOf=graphical-session.target
[Service]
Type=oneshot
-ExecStart=@QtBinariesDir@/qdbus org.kde.kcminit /kcminit org.kde.KCMInit.runPhase1
+ExecStart=@qdbus@ org.kde.kcminit /kcminit org.kde.KCMInit.runPhase1
Slice=session.slice
diff --git a/startkde/startplasma.cpp b/startkde/startplasma.cpp
index 4d31c6f408..17418b1ff7 100644
--- a/startkde/startplasma.cpp
+++ b/startkde/startplasma.cpp
@@ -57,7 +57,7 @@ void sigtermHandler(int signalNumber)
void messageBox(const QString &text)
{
out << text;
- runSync(QStringLiteral("xmessage"), {QStringLiteral("-geometry"), QStringLiteral("500x100"), text});
+ runSync(QStringLiteral("@xmessage@"), {QStringLiteral("-geometry"), QStringLiteral("500x100"), text});
}
QStringList allServices(const QLatin1String &prefix)
@@ -512,7 +512,7 @@ QProcess *setupKSplash()
if (ksplashCfg.readEntry("Engine", QStringLiteral("KSplashQML")) == QLatin1String("KSplashQML")) {
p = new QProcess;
p->setProcessChannelMode(QProcess::ForwardedChannels);
- p->start(QStringLiteral("ksplashqml"), {ksplashCfg.readEntry("Theme", QStringLiteral("Breeze"))});
+ p->start(QStringLiteral(CMAKE_INSTALL_FULL_BINDIR "/ksplashqml"), {ksplashCfg.readEntry("Theme", QStringLiteral("Breeze"))});
}
}
return p;
diff --git a/startkde/systemd/plasma-ksplash-ready.service.in b/startkde/systemd/plasma-ksplash-ready.service.in
index 1e903130a9..0861c3d136 100644
--- a/startkde/systemd/plasma-ksplash-ready.service.in
+++ b/startkde/systemd/plasma-ksplash-ready.service.in
@@ -6,5 +6,5 @@ PartOf=graphical-session.target
[Service]
Type=oneshot
-ExecStart=dbus-send --session --reply-timeout=1 --type=method_call --dest=org.kde.KSplash /KSplash org.kde.KSplash.setStage string:ready
+ExecStart=@dbusSend@ --session --reply-timeout=1 --type=method_call --dest=org.kde.KSplash /KSplash org.kde.KSplash.setStage string:ready
Slice=session.slice

View File

@@ -0,0 +1,12 @@
{
mkKdeDerivation,
pkg-config,
gpsd,
}:
mkKdeDerivation {
pname = "plasma5support";
extraNativeBuildInputs = [ pkg-config ];
extraBuildInputs = [ gpsd ];
}

View File

@@ -0,0 +1,12 @@
{
mkKdeDerivation,
pkg-config,
plymouth,
}:
mkKdeDerivation {
pname = "plymouth-kcm";
extraNativeBuildInputs = [ pkg-config ];
extraBuildInputs = [ plymouth ];
meta.mainProgram = "kplymouththemeinstaller";
}

View File

@@ -0,0 +1,15 @@
{
mkKdeDerivation,
qtdeclarative,
kirigami,
knotifications,
}:
mkKdeDerivation {
pname = "polkit-kde-agent-1";
extraBuildInputs = [
qtdeclarative
kirigami
knotifications
];
}

View File

@@ -0,0 +1,15 @@
{
mkKdeDerivation,
pkg-config,
ddcutil,
qtwayland,
}:
mkKdeDerivation {
pname = "powerdevil";
extraNativeBuildInputs = [ pkg-config ];
extraBuildInputs = [
ddcutil
qtwayland
];
}

View File

@@ -0,0 +1,10 @@
{
mkKdeDerivation,
cups,
}:
mkKdeDerivation {
pname = "print-manager";
# FIXME: cups-smb?
extraBuildInputs = [ cups ];
}

View File

@@ -0,0 +1,4 @@
{ mkKdeDerivation }:
mkKdeDerivation {
pname = "qqc2-breeze-style";
}

View File

@@ -0,0 +1,5 @@
{ mkKdeDerivation }:
mkKdeDerivation {
pname = "sddm-kcm";
meta.mainProgram = "sddmthemeinstaller";
}

View File

@@ -0,0 +1,19 @@
{
mkKdeDerivation,
pkg-config,
c-ares,
curl,
libphonenumber,
protobuf,
}:
mkKdeDerivation {
pname = "spacebar";
extraNativeBuildInputs = [ pkg-config ];
extraBuildInputs = [
c-ares
curl
libphonenumber
protobuf
];
}

View File

@@ -0,0 +1,23 @@
{
mkKdeDerivation,
qtwayland,
qtmultimedia,
opencv,
}:
mkKdeDerivation {
pname = "spectacle";
extraBuildInputs = [
qtwayland
qtmultimedia
(opencv.override {
enableCuda = false; # fails to compile, disabled in case someone sets config.cudaSupport
enabledModules = [
"core"
"imgproc"
]; # https://invent.kde.org/graphics/spectacle/-/blob/master/CMakeLists.txt?ref_type=heads#L83
runAccuracyTests = false; # tests will fail because of missing plugins but that's okay
})
];
meta.mainProgram = "spectacle";
}

View File

@@ -0,0 +1,5 @@
{ mkKdeDerivation }:
mkKdeDerivation {
pname = "systemsettings";
meta.mainProgram = "systemsettings";
}

View File

@@ -0,0 +1,16 @@
{
mkKdeDerivation,
pkg-config,
libwacom,
xf86_input_wacom,
}:
mkKdeDerivation {
pname = "wacomtablet";
extraNativeBuildInputs = [ pkg-config ];
extraBuildInputs = [
libwacom
xf86_input_wacom
];
meta.mainProgram = "kde_wacom_tabletfinder";
}

View File

@@ -0,0 +1,15 @@
{
mkKdeDerivation,
pkg-config,
qtwayland,
cups,
}:
mkKdeDerivation {
pname = "xdg-desktop-portal-kde";
extraNativeBuildInputs = [ pkg-config ];
extraBuildInputs = [
qtwayland
cups
];
}