1{
2 stdenv,
3 lib,
4 fetchFromGitHub,
5 cmake,
6 pkg-config,
7 wayland,
8 dwayland,
9 libsForQt5,
10 extra-cmake-modules,
11 gsettings-qt,
12 libepoxy,
13 libinput,
14 libgbm,
15 lcms2,
16 xorg,
17}:
18
19stdenv.mkDerivation rec {
20 pname = "deepin-kwin";
21 version = "5.25.27";
22
23 src = fetchFromGitHub {
24 owner = "linuxdeepin";
25 repo = pname;
26 rev = version;
27 hash = "sha256-EjPPjdxa+iL/nXhuccoM3NiLmGXh7Un2aGz8O3sP6xE=";
28 };
29
30 patches = [ ./0001-hardcode-fallback-background.diff ];
31
32 # Avoid using absolute path to distinguish applications
33 postPatch = ''
34 substituteInPlace src/effects/screenshot/screenshotdbusinterface1.cpp \
35 --replace 'file.readAll().startsWith(DEFINE_DDE_DOCK_PATH"dde-dock")' 'file.readAll().contains("dde-dock")'
36 '';
37
38 nativeBuildInputs = [
39 cmake
40 pkg-config
41 extra-cmake-modules
42 libsForQt5.wrapQtAppsHook
43 libsForQt5.qttools
44 ];
45
46 buildInputs = [
47 wayland
48 dwayland
49 libepoxy
50 gsettings-qt
51
52 libinput
53 libgbm
54 lcms2
55
56 xorg.libxcb
57 xorg.libXdmcp
58 xorg.libXcursor
59 xorg.xcbutilcursor
60 xorg.libXtst
61 xorg.libXScrnSaver
62 ]
63 ++ (with libsForQt5; [
64 qtbase
65 qtx11extras
66 kconfig
67 kconfigwidgets
68 kcoreaddons
69 kcrash
70 kdbusaddons
71 kiconthemes
72 kglobalaccel
73 kidletime
74 knotifications
75 kpackage
76 plasma-framework
77 kcmutils
78 knewstuff
79 kdecoration
80 kscreenlocker
81 breeze-qt5
82 ]);
83
84 cmakeFlags = [ "-DKWIN_BUILD_RUNNERS=OFF" ];
85
86 outputs = [
87 "out"
88 "dev"
89 ];
90
91 meta = {
92 description = "Fork of kwin, an easy to use, but flexible, composited Window Manager";
93 homepage = "https://github.com/linuxdeepin/deepin-kwin";
94 license = lib.licenses.lgpl21Plus;
95 platforms = lib.platforms.linux;
96 teams = [ lib.teams.deepin ];
97 };
98}