1{
2 stdenv,
3 lib,
4 fetchFromGitHub,
5 cmake,
6 pkg-config,
7 libsForQt5,
8 dtkwidget,
9 qt5integration,
10 qt5platform-plugins,
11 dde-tray-loader,
12 gsettings-qt,
13 gtest,
14}:
15
16stdenv.mkDerivation rec {
17 pname = "dde-session-ui";
18 version = "6.0.20";
19
20 src = fetchFromGitHub {
21 owner = "linuxdeepin";
22 repo = pname;
23 rev = version;
24 hash = "sha256-3twtJ1KT7TqpyLopHqPY2Lo8oZsH9liir0SJUV/k3OU=";
25 };
26
27 postPatch = ''
28 substituteInPlace widgets/fullscreenbackground.cpp \
29 --replace "/usr/share/backgrounds" "/run/current-system/sw/share/backgrounds" \
30 --replace "/usr/share/wallpapers" "/run/current-system/sw/share/wallpapers"
31
32 substituteInPlace dde-warning-dialog/src/org.deepin.dde.WarningDialog1.service dde-welcome/src/org.deepin.dde.Welcome1.service \
33 --replace "/usr/lib/deepin-daemon" "/run/current-system/sw/lib/deepin-daemon"
34
35 substituteInPlace dmemory-warning-dialog/src/org.deepin.dde.MemoryWarningDialog1.service \
36 --replace "/usr" "$out"
37 '';
38
39 nativeBuildInputs = [
40 cmake
41 pkg-config
42 libsForQt5.qttools
43 libsForQt5.wrapQtAppsHook
44 ];
45
46 buildInputs = [
47 libsForQt5.qtbase
48 dtkwidget
49 qt5platform-plugins
50 qt5integration
51 dde-tray-loader
52 gsettings-qt
53 libsForQt5.qtx11extras
54 gtest
55 ];
56
57 cmakeFlags = [ "-DDISABLE_SYS_UPDATE=ON" ];
58
59 postFixup = ''
60 for binary in $out/lib/deepin-daemon/*; do
61 wrapProgram $binary "''${qtWrapperArgs[@]}"
62 done
63 '';
64
65 meta = with lib; {
66 description = "Deepin desktop-environment - Session UI module";
67 homepage = "https://github.com/linuxdeepin/dde-session-ui";
68 license = licenses.gpl3Plus;
69 platforms = platforms.linux;
70 teams = [ teams.deepin ];
71 };
72}