depot/third_party/nixpkgs/pkgs/desktops/plasma-5/plasma-workspace/default.nix
Default email c594a97518 Project import generated by Copybara.
GitOrigin-RevId: 301aada7a64812853f2e2634a530ef5d34505048
2022-10-21 20:38:19 +02:00

171 lines
2.9 KiB
Nix

{ mkDerivation
, lib
, extra-cmake-modules
, kdoctools
, coreutils
, gnugrep
, gnused
, isocodes
, libdbusmenu
, libSM
, libXcursor
, libXtst
, libXft
, pam
, wayland
, xmessage
, xsetroot
, baloo
, breeze-qt5
, kactivities
, kactivities-stats
, kcmutils
, kconfig
, kcrash
, kdbusaddons
, kdeclarative
, kdelibs4support
, kdesu
, kglobalaccel
, kidletime
, kinit
, kjsembed
, knewstuff
, knotifyconfig
, kpackage
, kpeople
, krunner
, kscreenlocker
, ktexteditor
, ktextwidgets
, kwallet
, kwayland
, kwin
, kxmlrpcclient
, libkscreen
, libksysguard
, libqalculate
, networkmanager-qt
, phonon
, plasma-framework
, prison
, solid
, kholidays
, kquickcharts
, appstream-qt
, plasma-wayland-protocols
, kpipewire
, libkexiv2
, qtgraphicaleffects
, qtquickcontrols
, qtquickcontrols2
, qtscript
, qttools
, qtwayland
, qtx11extras
, qqc2-desktop-style
, polkit-qt
, pipewire
, libdrm
}:
let inherit (lib) getBin getLib; in
mkDerivation {
pname = "plasma-workspace";
passthru.providedSessions = [ "plasma" "plasmawayland" ];
nativeBuildInputs = [ extra-cmake-modules kdoctools ];
buildInputs = [
isocodes
libdbusmenu
libSM
libXcursor
libXtst
libXft
pam
wayland
baloo
kactivities
kactivities-stats
kcmutils
kconfig
kcrash
kdbusaddons
kdeclarative
kdelibs4support
kdesu
kglobalaccel
kidletime
kjsembed
knewstuff
knotifyconfig
kpackage
kpeople
krunner
kscreenlocker
ktexteditor
ktextwidgets
kwallet
kwayland
kwin
kxmlrpcclient
libkscreen
libksysguard
libqalculate
networkmanager-qt
phonon
plasma-framework
prison
solid
kholidays
kquickcharts
appstream-qt
plasma-wayland-protocols
kpipewire
libkexiv2
qtgraphicaleffects
qtquickcontrols
qtquickcontrols2
qtscript
qtwayland
qtx11extras
qqc2-desktop-style
polkit-qt
pipewire
libdrm
];
propagatedUserEnvPkgs = [ qtgraphicaleffects ];
outputs = [ "out" "dev" ];
cmakeFlags = [
''-DNIXPKGS_BREEZE_WALLPAPERS=${getBin breeze-qt5}/share/wallpapers''
];
patches = [
./0001-startkde.patch
./0002-absolute-wallpaper-install-dir.patch
];
# QT_INSTALL_BINS refers to qtbase, and qdbus is in qttools
postPatch = ''
substituteInPlace CMakeLists.txt \
--replace 'ecm_query_qt(QtBinariesDir QT_INSTALL_BINS)' 'set(QtBinariesDir "${lib.getBin qttools}/bin")'
'';
# work around wrapQtAppsHook double-wrapping kcminit_startup,
# which is a symlink to kcminit
postFixup = ''
ln -sf $out/bin/kcminit $out/bin/kcminit_startup
'';
NIX_CFLAGS_COMPILE = [
''-DNIXPKGS_XMESSAGE="${getBin xmessage}/bin/xmessage"''
''-DNIXPKGS_XSETROOT="${getBin xsetroot}/bin/xsetroot"''
''-DNIXPKGS_START_KDEINIT_WRAPPER="${getLib kinit}/libexec/kf5/start_kdeinit_wrapper"''
''-DNIXPKGS_KDEINIT5_SHUTDOWN="${getBin kinit}/bin/kdeinit5_shutdown"''
];
}