@@ -0,0 +1,45 @@
1+{ stdenv, fetchFromGitHub, pkgconfig, qmake, gsettings-qt, pythonPackages }:
2+
3+stdenv.mkDerivation rec {
4+ name = "${pname}-${version}";
5+ pname = "dtkcore";
6+ version = "2.0.9";
7+
8+ src = fetchFromGitHub {
9+ owner = "linuxdeepin";
10+ repo = pname;
11+ rev = version;
12+ sha256 = "0jfl4w3sviy59rl41a5507dbhqhsxy7hqw3gf64a57gjlbdskmm1";
13+ };
14+
15+ nativeBuildInputs = [
16+ pkgconfig
17+ qmake
18+ pythonPackages.wrapPython
19+ ];
20+
21+ buildInputs = [
22+ gsettings-qt
23+ ];
24+
25+ postPatch = ''
26+ sed -i src/src.pro src/dtk_module.prf \
27+ -e "s,\$\''${QT_HOST_DATA}/mkspecs,$out/mkspecs,"
28+
29+ sed -i tools/script/dtk-translate.py \
30+ -e "s,#!env,#!/usr/bin/env,"
31+ '';
32+
33+ postFixup = ''
34+ chmod +x $out/lib/dtk2/*.py
35+ wrapPythonProgramsIn "$out/lib/dtk2" "$out $pythonPath"
36+ '';
37+
38+ meta = with stdenv.lib; {
39+ description = "Deepin tool kit core modules";
40+ homepage = https://github.com/linuxdeepin/dtkcore;
41+ license = licenses.gpl3;
42+ platforms = platforms.linux;
43+ maintainers = with maintainers; [ romildo ];
44+ };
45+}