kinfocenter: fix symlink to systemsettings5

As `kinfocenter`'s implementation consists of only KCMs, which are
actually just displayed using `systemsettings5`' KCM shell, the
`kinfocenter` binary is just a symlink to `systemsettings5`.

In traditional FHS environments, having a relative symlink to the
`systemsettings5` binary within the same `bin/` directory works just
fine, whereas this is broken on NixOS where `systemsettings5` resides in
a completely different `bin/` directory of the corresponding store item.

Usually CMake's `find_package` should be able to locate the
`systemsettings5` binary, but fails for reasons unknown to do so on
NixOS - so for now fixing the symlink manually as part of the `preFixup`
phase will do the job of making `kinfocenter` work again.
This commit is contained in:
Elias Probst 2021-01-03 23:24:59 +01:00 committed by Peter Hoeg
parent 290fdcf76f
commit aec54bddb8

View File

@ -5,7 +5,7 @@
kcmutils, kcompletion, kconfig, kconfigwidgets, kcoreaddons, kdbusaddons,
kdeclarative, kdelibs4support, ki18n, kiconthemes, kio, kirigami2, kpackage,
kservice, kwayland, kwidgetsaddons, kxmlgui, libraw1394, libGLU, pciutils,
solid
solid, systemsettings
}:
mkDerivation {
@ -15,6 +15,11 @@ mkDerivation {
buildInputs = [
kcmutils kcompletion kconfig kconfigwidgets kcoreaddons kdbusaddons
kdeclarative kdelibs4support ki18n kiconthemes kio kirigami2 kpackage
kservice kwayland kwidgetsaddons kxmlgui libraw1394 libGLU pciutils solid
kservice kwayland kwidgetsaddons kxmlgui libraw1394 libGLU pciutils solid systemsettings
];
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
'';
}