/
default.nix
84 lines (72 loc) · 1.88 KB
/
default.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
{ stdenv
, lib
, fetchFromGitHub
, cmake
, pkg-config
, qttools
, wrapQtAppsHook
, qtbase
, dtkwidget
, qt5integration
, qt5platform-plugins
, dde-dock
, gsettings-qt
, qtx11extras
, gtest
}:
stdenv.mkDerivation rec {
pname = "dde-session-ui";
version = "6.0.16";
src = fetchFromGitHub {
owner = "linuxdeepin";
repo = pname;
rev = version;
hash = "sha256-hxunGK7DxRuAbmi6PtylHCBajV3b1qbFVA+AiuOCcN0=";
};
postPatch = ''
substituteInPlace widgets/fullscreenbackground.cpp \
--replace "/usr/share/backgrounds" "/run/current-system/sw/share/backgrounds" \
--replace "/usr/share/wallpapers" "/run/current-system/sw/share/wallpapers"
substituteInPlace dde-warning-dialog/src/org.deepin.dde.WarningDialog1.service dde-welcome/src/org.deepin.dde.Welcome1.service \
--replace "/usr/lib/deepin-daemon" "/run/current-system/sw/lib/deepin-daemon"
substituteInPlace dmemory-warning-dialog/src/org.deepin.dde.MemoryWarningDialog1.service \
--replace "/usr" "$out"
'';
nativeBuildInputs = [
cmake
pkg-config
qttools
wrapQtAppsHook
];
buildInputs = [
qtbase
dtkwidget
qt5platform-plugins
dde-dock
gsettings-qt
qtx11extras
gtest
];
cmakeFlags = [
"-DDISABLE_SYS_UPDATE=ON"
];
# qt5integration must be placed before qtsvg in QT_PLUGIN_PATH
qtWrapperArgs = [
"--prefix QT_PLUGIN_PATH : ${qt5integration}/${qtbase.qtPluginPrefix}"
];
preFixup = ''
qtWrapperArgs+=("''${gappsWrapperArgs[@]}")
'';
postFixup = ''
for binary in $out/lib/deepin-daemon/*; do
wrapProgram $binary "''${qtWrapperArgs[@]}"
done
'';
meta = with lib; {
description = "Deepin desktop-environment - Session UI module";
homepage = "https://github.com/linuxdeepin/dde-session-ui";
license = licenses.gpl3Plus;
platforms = platforms.linux;
maintainers = teams.deepin.members;
};
}