2018-09-01 12:19:20 +01:00
|
|
|
{ stdenv, fetchFromGitHub, pkgconfig, qmake, gsettings-qt, pythonPackages }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "${pname}-${version}";
|
|
|
|
pname = "dtkcore";
|
2018-09-28 20:31:40 +01:00
|
|
|
version = "2.0.9.4";
|
2018-09-01 12:19:20 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "linuxdeepin";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2018-09-28 20:31:40 +01:00
|
|
|
sha256 = "184yg1501hvv7n1c7r0fl2y4d4nhif368rrbrd1phwzfvh6x1ji4";
|
2018-09-01 12:19:20 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
pkgconfig
|
|
|
|
qmake
|
|
|
|
pythonPackages.wrapPython
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
gsettings-qt
|
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
2018-09-02 19:15:01 +01:00
|
|
|
# Only define QT_HOST_DATA if it is empty
|
|
|
|
sed '/QT_HOST_DATA=/a }' -i src/dtk_module.prf
|
|
|
|
sed '/QT_HOST_DATA=/i isEmpty(QT_HOST_DATA) {' -i src/dtk_module.prf
|
2018-09-01 12:19:20 +01:00
|
|
|
|
2018-09-02 19:15:01 +01:00
|
|
|
# Fix shebang
|
|
|
|
sed -i tools/script/dtk-translate.py -e "s,#!env,#!/usr/bin/env,"
|
|
|
|
'';
|
|
|
|
|
|
|
|
preConfigure = ''
|
|
|
|
qmakeFlags="$qmakeFlags QT_HOST_DATA=$out"
|
2018-09-01 12:19:20 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
postFixup = ''
|
|
|
|
chmod +x $out/lib/dtk2/*.py
|
|
|
|
wrapPythonProgramsIn "$out/lib/dtk2" "$out $pythonPath"
|
|
|
|
'';
|
|
|
|
|
2018-09-02 19:15:01 +01:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2018-09-01 12:19:20 +01:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Deepin tool kit core modules";
|
|
|
|
homepage = https://github.com/linuxdeepin/dtkcore;
|
|
|
|
license = licenses.gpl3;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with maintainers; [ romildo ];
|
|
|
|
};
|
|
|
|
}
|