mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-21 11:34:13 +00:00
kdePackages.kde-gtk-config: hardcode more dependency paths
This commit is contained in:
parent
4b596e927e
commit
508a0a890c
@ -1,5 +1,9 @@
|
||||
{
|
||||
lib,
|
||||
mkKdeDerivation,
|
||||
substituteAll,
|
||||
procps,
|
||||
xsettingsd,
|
||||
pkg-config,
|
||||
wrapGAppsHook3,
|
||||
sass,
|
||||
@ -11,7 +15,17 @@ mkKdeDerivation {
|
||||
|
||||
# The gtkconfig KDED module will crash the daemon if the GSettings schemas
|
||||
# aren't found.
|
||||
patches = [./0001-gsettings-schemas-path.patch];
|
||||
patches = [
|
||||
./0001-gsettings-schemas-path.patch
|
||||
(
|
||||
substituteAll {
|
||||
src = ./dependency-paths.patch;
|
||||
pgrep = lib.getExe' procps "pgrep";
|
||||
xsettingsd = lib.getExe xsettingsd;
|
||||
}
|
||||
)
|
||||
];
|
||||
|
||||
preConfigure = ''
|
||||
NIX_CFLAGS_COMPILE+=" -DGSETTINGS_SCHEMAS_PATH=\"$GSETTINGS_SCHEMAS_PATH\""
|
||||
'';
|
||||
@ -21,4 +35,10 @@ mkKdeDerivation {
|
||||
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
|
||||
'';
|
||||
}
|
||||
|
22
pkgs/kde/plasma/kde-gtk-config/dependency-paths.patch
Normal file
22
pkgs/kde/plasma/kde-gtk-config/dependency-paths.patch
Normal 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);
|
||||
}
|
Loading…
Reference in New Issue
Block a user