2022-10-21 18:38:19 +00:00
|
|
|
{ mkDerivation
|
|
|
|
, lib
|
|
|
|
, extra-cmake-modules
|
|
|
|
, kdoctools
|
2024-09-19 14:19:46 +00:00
|
|
|
, wayland-scanner
|
2022-10-21 18:38:19 +00:00
|
|
|
, fetchpatch
|
|
|
|
, libepoxy
|
|
|
|
, lcms2
|
|
|
|
, libICE
|
|
|
|
, libSM
|
|
|
|
, libcap
|
|
|
|
, libdrm
|
|
|
|
, libinput
|
|
|
|
, libxkbcommon
|
|
|
|
, mesa
|
|
|
|
, pipewire
|
|
|
|
, udev
|
|
|
|
, wayland
|
|
|
|
, xcb-util-cursor
|
|
|
|
, xwayland
|
|
|
|
, plasma-wayland-protocols
|
|
|
|
, wayland-protocols
|
|
|
|
, libxcvt
|
|
|
|
, qtdeclarative
|
|
|
|
, qtmultimedia
|
|
|
|
, qtquickcontrols2
|
|
|
|
, qtscript
|
|
|
|
, qtsensors
|
|
|
|
, qtvirtualkeyboard
|
|
|
|
, qtx11extras
|
|
|
|
, breeze-qt5
|
|
|
|
, kactivities
|
|
|
|
, kcompletion
|
|
|
|
, kcmutils
|
|
|
|
, kconfig
|
|
|
|
, kconfigwidgets
|
|
|
|
, kcoreaddons
|
|
|
|
, kcrash
|
|
|
|
, kdeclarative
|
|
|
|
, kdecoration
|
|
|
|
, kglobalaccel
|
|
|
|
, ki18n
|
|
|
|
, kiconthemes
|
|
|
|
, kidletime
|
|
|
|
, kinit
|
|
|
|
, kio
|
|
|
|
, knewstuff
|
|
|
|
, knotifications
|
|
|
|
, kpackage
|
|
|
|
, krunner
|
|
|
|
, kscreenlocker
|
|
|
|
, kservice
|
|
|
|
, kwayland
|
|
|
|
, kwidgetsaddons
|
|
|
|
, kwindowsystem
|
|
|
|
, kxmlgui
|
|
|
|
, plasma-framework
|
|
|
|
, libqaccessibilityclient
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
# TODO (ttuegel): investigate qmlplugindump failure
|
|
|
|
|
|
|
|
mkDerivation {
|
2022-03-10 19:12:11 +00:00
|
|
|
pname = "kwin";
|
2024-09-19 14:19:46 +00:00
|
|
|
nativeBuildInputs = [ extra-cmake-modules kdoctools wayland-scanner ];
|
2020-04-24 23:36:52 +00:00
|
|
|
buildInputs = [
|
2022-10-21 18:38:19 +00:00
|
|
|
libepoxy
|
|
|
|
lcms2
|
|
|
|
libICE
|
|
|
|
libSM
|
|
|
|
libcap
|
|
|
|
libdrm
|
|
|
|
libinput
|
|
|
|
libxkbcommon
|
|
|
|
mesa
|
|
|
|
pipewire
|
|
|
|
udev
|
|
|
|
wayland
|
|
|
|
xcb-util-cursor
|
|
|
|
xwayland
|
|
|
|
libxcvt
|
|
|
|
plasma-wayland-protocols
|
|
|
|
wayland-protocols
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-10-21 18:38:19 +00:00
|
|
|
qtdeclarative
|
|
|
|
qtmultimedia
|
|
|
|
qtquickcontrols2
|
|
|
|
qtscript
|
|
|
|
qtsensors
|
|
|
|
qtvirtualkeyboard
|
|
|
|
qtx11extras
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-10-21 18:38:19 +00:00
|
|
|
breeze-qt5
|
|
|
|
kactivities
|
|
|
|
kcmutils
|
|
|
|
kcompletion
|
|
|
|
kconfig
|
|
|
|
kconfigwidgets
|
|
|
|
kcoreaddons
|
|
|
|
kcrash
|
|
|
|
kdeclarative
|
|
|
|
kdecoration
|
|
|
|
kglobalaccel
|
|
|
|
ki18n
|
|
|
|
kiconthemes
|
|
|
|
kidletime
|
|
|
|
kinit
|
|
|
|
kio
|
|
|
|
knewstuff
|
|
|
|
knotifications
|
|
|
|
kpackage
|
|
|
|
krunner
|
|
|
|
kscreenlocker
|
|
|
|
kservice
|
|
|
|
kwayland
|
|
|
|
kwidgetsaddons
|
|
|
|
kwindowsystem
|
|
|
|
kxmlgui
|
|
|
|
plasma-framework
|
|
|
|
libqaccessibilityclient
|
2021-05-28 09:39:13 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
2021-12-06 16:07:01 +00:00
|
|
|
outputs = [ "out" "dev" ];
|
2022-06-16 17:23:12 +00:00
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
patchShebangs src/effects/strip-effect-metadata.py
|
|
|
|
'';
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
patches = [
|
|
|
|
./0001-follow-symlinks.patch
|
|
|
|
./0002-xwayland.patch
|
2021-03-20 04:20:00 +00:00
|
|
|
./0003-plugins-qpa-allow-using-nixos-wrapper.patch
|
|
|
|
./0001-NixOS-Unwrap-executable-name-for-.desktop-search.patch
|
2022-09-22 12:36:57 +00:00
|
|
|
./0001-Lower-CAP_SYS_NICE-from-the-ambient-set.patch
|
2021-12-06 16:07:01 +00:00
|
|
|
# Pass special environments through arguemnts to `kwin_wayland`, bypassing
|
|
|
|
# ld.so(8) environment stripping due to `kwin_wayland`'s capabilities.
|
|
|
|
# We need this to have `TZDIR` correctly set for `plasmashell`, or
|
|
|
|
# everything related to timezone, like clock widgets, will be broken.
|
|
|
|
# https://invent.kde.org/plasma/kwin/-/merge_requests/1590
|
2021-09-26 12:46:18 +00:00
|
|
|
(fetchpatch {
|
2021-12-06 16:07:01 +00:00
|
|
|
url = "https://invent.kde.org/plasma/kwin/-/commit/9a008b223ad696db3bf5692750f2b74e578e08b8.diff";
|
|
|
|
sha256 = "sha256-f35G+g2MVABLDbAkCed3ZmtDWrzYn1rdD08mEx35j4k=";
|
2021-09-26 12:46:18 +00:00
|
|
|
})
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
2023-02-16 17:41:37 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
CXXFLAGS = [
|
2023-07-15 17:15:38 +00:00
|
|
|
''-DNIXPKGS_XWAYLAND=\"${lib.getExe xwayland}\"''
|
2023-03-15 16:39:30 +00:00
|
|
|
];
|
2023-02-16 17:41:37 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
postInstall = ''
|
|
|
|
# Some package(s) refer to these service types by the wrong name.
|
|
|
|
# I would prefer to patch those packages, but I cannot find them!
|
|
|
|
ln -s ''${!outputBin}/share/kservicetypes5/kwineffect.desktop \
|
|
|
|
''${!outputBin}/share/kservicetypes5/kwin-effect.desktop
|
|
|
|
ln -s ''${!outputBin}/share/kservicetypes5/kwinscript.desktop \
|
|
|
|
''${!outputBin}/share/kservicetypes5/kwin-script.desktop
|
|
|
|
'';
|
|
|
|
}
|