nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 stdenv,
3 lib,
4 fetchFromGitHub,
5 cmake,
6 pkg-config,
7 doxygen,
8 libsForQt5,
9 dtkgui,
10}:
11
12stdenv.mkDerivation rec {
13 pname = "dtkdeclarative";
14 version = "5.6.32";
15
16 src = fetchFromGitHub {
17 owner = "linuxdeepin";
18 repo = pname;
19 rev = version;
20 hash = "sha256-MOiNpuvYwJi9rNKx6TuUuWnlGhmZrRbL48EFapy442M=";
21 };
22
23 patches = [
24 ./fix-pkgconfig-path.patch
25 ./fix-pri-path.patch
26 ];
27
28 nativeBuildInputs = [
29 cmake
30 pkg-config
31 doxygen
32 libsForQt5.qttools
33 libsForQt5.wrapQtAppsHook
34 ];
35
36 propagatedBuildInputs = [
37 dtkgui
38 libsForQt5.qtdeclarative
39 libsForQt5.qtquickcontrols2
40 libsForQt5.qtgraphicaleffects
41 ];
42
43 cmakeFlags = [
44 "-DDTK_VERSION=${version}"
45 "-DBUILD_DOCS=ON"
46 "-DBUILD_EXAMPLES=ON"
47 "-DMKSPECS_INSTALL_DIR=${placeholder "dev"}/mkspecs/modules"
48 "-DQCH_INSTALL_DESTINATION=${placeholder "doc"}/${libsForQt5.qtbase.qtDocPrefix}"
49 "-DQML_INSTALL_DIR=${placeholder "out"}/${libsForQt5.qtbase.qtQmlPrefix}"
50 ];
51
52 preConfigure = ''
53 # qt.qpa.plugin: Could not find the Qt platform plugin "minimal"
54 # A workaround is to set QT_PLUGIN_PATH explicitly
55 export QT_PLUGIN_PATH=${libsForQt5.qtbase.bin}/${libsForQt5.qtbase.qtPluginPrefix}
56 export QML2_IMPORT_PATH=${libsForQt5.qtdeclarative.bin}/${libsForQt5.qtbase.qtQmlPrefix}
57 '';
58
59 outputs = [
60 "out"
61 "dev"
62 "doc"
63 ];
64
65 meta = with lib; {
66 description = "Widget development toolkit based on QtQuick/QtQml";
67 mainProgram = "dtk-exhibition";
68 homepage = "https://github.com/linuxdeepin/dtkdeclarative";
69 license = licenses.lgpl3Plus;
70 platforms = platforms.linux;
71 teams = [ teams.deepin ];
72 };
73}