nixpkgs/pkgs/desktops/plasma-5/kinfocenter.nix
Elias Probst aec54bddb8 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.
2021-02-17 09:06:14 +08:00

26 lines
1020 B
Nix

{
mkDerivation, lib,
extra-cmake-modules, kdoctools,
qtbase,
kcmutils, kcompletion, kconfig, kconfigwidgets, kcoreaddons, kdbusaddons,
kdeclarative, kdelibs4support, ki18n, kiconthemes, kio, kirigami2, kpackage,
kservice, kwayland, kwidgetsaddons, kxmlgui, libraw1394, libGLU, pciutils,
solid, systemsettings
}:
mkDerivation {
name = "kinfocenter";
meta.broken = lib.versionOlder qtbase.version "5.15.0";
nativeBuildInputs = [ extra-cmake-modules kdoctools ];
buildInputs = [
kcmutils kcompletion kconfig kconfigwidgets kcoreaddons kdbusaddons
kdeclarative kdelibs4support ki18n kiconthemes kio kirigami2 kpackage
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
'';
}