tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
deepin.dtk6widget: init at 6.0.15
rewine
2 years ago
703ccfb3
bdc7fd3c
+135
5 changed files
expand all
collapse all
unified
split
pkgs
desktops
deepin
default.nix
library
dtk6widget
default.nix
fix-build-on-qt-6_7.patch
fix-pkgconfig-path.patch
fix-pri-path.patch
+1
pkgs/desktops/deepin/default.nix
···
25
25
util-dfm = callPackage ./library/util-dfm { };
26
26
dtk6core = callPackage ./library/dtk6core { };
27
27
dtk6gui = callPackage ./library/dtk6gui { };
28
28
+
dtk6widget = callPackage ./library/dtk6widget { };
28
29
29
30
#### CORE
30
31
deepin-kwin = callPackage ./core/deepin-kwin { };
+83
pkgs/desktops/deepin/library/dtk6widget/default.nix
···
1
1
+
{ stdenv
2
2
+
, lib
3
3
+
, fetchFromGitHub
4
4
+
, cmake
5
5
+
, pkg-config
6
6
+
, doxygen
7
7
+
, qt6Packages
8
8
+
, dtk6gui
9
9
+
, cups
10
10
+
, libstartup_notification
11
11
+
}:
12
12
+
13
13
+
stdenv.mkDerivation (finalAttrs: {
14
14
+
pname = "dtk6widget";
15
15
+
version = "6.0.15";
16
16
+
17
17
+
src = fetchFromGitHub {
18
18
+
owner = "linuxdeepin";
19
19
+
repo = "dtk6widget";
20
20
+
rev = finalAttrs.version;
21
21
+
hash = "sha256-QCdRjkD4JTPecLeZK+Y5U/H9pBgKI4DHRuchz/GymWQ=";
22
22
+
};
23
23
+
24
24
+
patches = [
25
25
+
./fix-pkgconfig-path.patch
26
26
+
./fix-pri-path.patch
27
27
+
./fix-build-on-qt-6_7.patch
28
28
+
];
29
29
+
30
30
+
postPatch = ''
31
31
+
substituteInPlace src/widgets/dapplication.cpp \
32
32
+
--replace-fail "auto dataDirs = DStandardPaths::standardLocations(QStandardPaths::GenericDataLocation);" \
33
33
+
"auto dataDirs = DStandardPaths::standardLocations(QStandardPaths::GenericDataLocation) << \"$out/share\";"
34
34
+
'';
35
35
+
36
36
+
nativeBuildInputs = [
37
37
+
cmake
38
38
+
doxygen
39
39
+
pkg-config
40
40
+
qt6Packages.qttools
41
41
+
qt6Packages.wrapQtAppsHook
42
42
+
];
43
43
+
44
44
+
buildInputs = [
45
45
+
cups
46
46
+
libstartup_notification
47
47
+
] ++ (with qt6Packages; [
48
48
+
qtbase
49
49
+
qtmultimedia
50
50
+
qtsvg
51
51
+
]);
52
52
+
53
53
+
propagatedBuildInputs = [ dtk6gui ];
54
54
+
55
55
+
cmakeFlags = [
56
56
+
"-DDTK_VERSION=${finalAttrs.version}"
57
57
+
"-DBUILD_DOCS=ON"
58
58
+
"-DMKSPECS_INSTALL_DIR=${placeholder "dev"}/mkspecs/modules"
59
59
+
"-DQCH_INSTALL_DESTINATION=${placeholder "doc"}/share/doc"
60
60
+
];
61
61
+
62
62
+
preConfigure = ''
63
63
+
# qt.qpa.plugin: Could not find the Qt platform plugin "minimal"
64
64
+
# A workaround is to set QT_PLUGIN_PATH explicitly
65
65
+
export QT_PLUGIN_PATH=${lib.getBin qt6Packages.qtbase}/${qt6Packages.qtbase.qtPluginPrefix}
66
66
+
'';
67
67
+
68
68
+
outputs = [ "out" "dev" "doc" ];
69
69
+
70
70
+
postFixup = ''
71
71
+
for binary in $out/lib/dtk6/DWidget/bin/*; do
72
72
+
wrapQtApp $binary
73
73
+
done
74
74
+
'';
75
75
+
76
76
+
meta = {
77
77
+
description = "Deepin graphical user interface library";
78
78
+
homepage = "https://github.com/linuxdeepin/dtk6widget";
79
79
+
license = lib.licenses.lgpl3Plus;
80
80
+
platforms = lib.platforms.linux;
81
81
+
maintainers = lib.teams.deepin.members;
82
82
+
};
83
83
+
})
+20
pkgs/desktops/deepin/library/dtk6widget/fix-build-on-qt-6_7.patch
···
1
1
+
diff --git a/src/widgets/dkeysequenceedit.cpp b/src/widgets/dkeysequenceedit.cpp
2
2
+
index a99e17ae..0e1c57f6 100644
3
3
+
--- a/src/widgets/dkeysequenceedit.cpp
4
4
+
+++ b/src/widgets/dkeysequenceedit.cpp
5
5
+
@@ -276,13 +276,13 @@ void DKeySequenceEdit::keyPressEvent(QKeyEvent *e)
6
6
+
}
7
7
+
8
8
+
if (e->modifiers() & Qt::ShiftModifier) {
9
9
+
- QList<int> possibleKeys = QKeyMapper::possibleKeys(e);
10
10
+
+ auto possibleKeys = QKeyMapper::possibleKeys(e);
11
11
+
int pkTotal = possibleKeys.count();
12
12
+
if (!pkTotal)
13
13
+
return;
14
14
+
bool found = false;
15
15
+
for (int i = 0; i < possibleKeys.size(); ++i) {
16
16
+
- if (possibleKeys.at(i) - nextKey == int(e->modifiers())
17
17
+
+ if (static_cast<int>(possibleKeys.at(i)) - nextKey == static_cast<int>(e->modifiers())
18
18
+
|| (possibleKeys.at(i) == nextKey && e->modifiers() == Qt::ShiftModifier)) {
19
19
+
nextKey = possibleKeys.at(i);
20
20
+
found = true;
+14
pkgs/desktops/deepin/library/dtk6widget/fix-pkgconfig-path.patch
···
1
1
+
diff --git a/misc/DtkWidget.pc.in b/misc/DtkWidget.pc.in
2
2
+
index 3c610669..b6ed04ca 100644
3
3
+
--- a/misc/DtkWidget.pc.in
4
4
+
+++ b/misc/DtkWidget.pc.in
5
5
+
@@ -1,7 +1,7 @@
6
6
+
prefix=@CMAKE_INSTALL_PREFIX@
7
7
+
exec_prefix=${prefix}
8
8
+
-libdir=${prefix}/@LIBRARY_INSTALL_DIR@
9
9
+
-includedir=${prefix}/@INCLUDE_INSTALL_DIR@
10
10
+
+libdir=@LIBRARY_INSTALL_DIR@
11
11
+
+includedir=@INCLUDE_INSTALL_DIR@
12
12
+
13
13
+
Name: dtk@DTK_VERSION_MAJOR@widget
14
14
+
Description: Deepin Tool Kit dtkwidget header files
+17
pkgs/desktops/deepin/library/dtk6widget/fix-pri-path.patch
···
1
1
+
diff --git a/misc/qt_lib_DtkWidget.pri.in b/misc/qt_lib_DtkWidget.pri.in
2
2
+
index 623878d3..561f5186 100644
3
3
+
--- a/misc/qt_lib_DtkWidget.pri.in
4
4
+
+++ b/misc/qt_lib_DtkWidget.pri.in
5
5
+
@@ -4,9 +4,9 @@ QT.dtkwidget.MINOR_VERSION = @PROJECT_VERSION_MINOR@
6
6
+
QT.dtkwidget.PATCH_VERSION = @PROJECT_VERSION_PATCH@
7
7
+
QT.dtkwidget.name = dtkwidget
8
8
+
QT.dtkwidget.module = dtk@DTK_VERSION_MAJOR@widget
9
9
+
-QT.dtkwidget.tools = @CMAKE_INSTALL_PREFIX@/@TOOL_INSTALL_DIR@
10
10
+
-QT.dtkwidget.libs = @CMAKE_INSTALL_PREFIX@/@LIBRARY_INSTALL_DIR@
11
11
+
-QT.dtkwidget.includes = @CMAKE_INSTALL_PREFIX@/@INCLUDE_INSTALL_DIR@
12
12
+
+QT.dtkwidget.tools = @TOOL_INSTALL_DIR@
13
13
+
+QT.dtkwidget.libs = @LIBRARY_INSTALL_DIR@
14
14
+
+QT.dtkwidget.includes = @INCLUDE_INSTALL_DIR@
15
15
+
QT.dtkwidget.frameworks =
16
16
+
QT.dtkwidget.depends = core gui dtkcore network concurrent dtkgui printsupport printsupport_private widgets widgets_private gui_private x11extras dbus
17
17
+
QT.dtkwidget.module_config = v2 internal_module ltcg