blob: 0e919c144d46cfd7813c1b9569d442eec4ad5089 (
plain) (
blame)
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
|
{ stdenv
, lib
, fetchFromGitHub
, cmake
, pkg-config
, wrapQtAppsHook
, qtbase
, dtkcore
, gsettings-qt
, libsecret
, xorg
, systemd
, dde-polkit-agent
}:
stdenv.mkDerivation rec {
pname = "dde-session";
version = "1.2.5";
src = fetchFromGitHub {
owner = "linuxdeepin";
repo = pname;
rev = version;
hash = "sha256-YYGRjVbVFyzmRhYu6sDtxzghocgM7Myr3K77AqWQk3E=";
};
postPatch = ''
substituteInPlace misc/CMakeLists.txt \
--replace "/etc" "$out/etc"
# Avoid using absolute path to distinguish applications
substituteInPlace src/dde-session/impl/sessionmanager.cpp \
--replace 'file.readAll().startsWith("/usr/bin/dde-lock")' 'file.readAll().contains("dde-lock")' \
substituteInPlace systemd/dde-session-initialized.target.wants/dde-polkit-agent.service \
--replace "/usr/lib/polkit-1-dde" "${dde-polkit-agent}/lib/polkit-1-dde"
for file in $(grep -rl "/usr/lib/deepin-daemon"); do
substituteInPlace $file --replace "/usr/lib/deepin-daemon" "/run/current-system/sw/lib/deepin-daemon"
done
for file in $(grep -rl "/usr/bin"); do
substituteInPlace $file --replace "/usr/bin/" "/run/current-system/sw/bin/"
done
'';
nativeBuildInputs = [
cmake
pkg-config
wrapQtAppsHook
];
buildInputs = [
qtbase
dtkcore
gsettings-qt
libsecret
xorg.libXcursor
systemd
];
# FIXME: dde-wayland always exits abnormally
passthru.providedSessions = [ "dde-x11" ];
meta = with lib; {
description = "New deepin session based on systemd and existing projects";
homepage = "https://github.com/linuxdeepin/dde-session";
license = licenses.gpl3Plus;
platforms = platforms.linux;
maintainers = teams.deepin.members;
};
}
|