2019-07-22 04:53:18 +02:00
|
|
|
{ stdenv, mkDerivation, fetchFromGitHub, pkgconfig, qmake, gsettings-qt, pythonPackages, deepin }:
|
2018-09-01 13:19:20 +02:00
|
|
|
|
2019-07-22 04:53:18 +02:00
|
|
|
mkDerivation rec {
|
2018-09-01 13:19:20 +02:00
|
|
|
pname = "dtkcore";
|
2019-11-12 02:08:40 +01:00
|
|
|
version = "2.1.1";
|
2018-09-01 13:19:20 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "linuxdeepin";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2019-11-12 02:08:40 +01:00
|
|
|
sha256 = "0xdh6mmrv8yr6mjmlwj0fv037parkkwfwlaibcbrskwxqp9iri1y";
|
2018-09-01 13:19:20 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
pkgconfig
|
|
|
|
qmake
|
|
|
|
pythonPackages.wrapPython
|
2019-05-04 13:42:00 +02:00
|
|
|
deepin.setupHook
|
2018-09-01 13:19:20 +02:00
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
gsettings-qt
|
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
2019-05-04 13:42:00 +02:00
|
|
|
searchHardCodedPaths # debugging
|
2018-09-01 13:19:20 +02:00
|
|
|
|
2018-09-02 20:15:01 +02:00
|
|
|
# Fix shebang
|
|
|
|
sed -i tools/script/dtk-translate.py -e "s,#!env,#!/usr/bin/env,"
|
|
|
|
'';
|
|
|
|
|
2019-06-26 03:26:16 +02:00
|
|
|
qmakeFlags = [
|
|
|
|
"DTK_VERSION=${version}"
|
2019-11-12 02:08:40 +01:00
|
|
|
"LIB_INSTALL_DIR=${placeholder "out"}/lib"
|
2019-06-26 03:26:16 +02:00
|
|
|
"MKSPECS_INSTALL_DIR=${placeholder "out"}/mkspecs"
|
|
|
|
];
|
2018-09-01 13:19:20 +02:00
|
|
|
|
|
|
|
postFixup = ''
|
2019-11-12 02:08:40 +01:00
|
|
|
chmod +x $out/lib/libdtk-${version}/DCore/bin/*.py
|
|
|
|
wrapPythonProgramsIn "$out/lib/libdtk-${version}/DCore/bin" "$out $pythonPath"
|
2019-05-04 13:42:00 +02:00
|
|
|
searchHardCodedPaths $out # debugging
|
2018-09-01 13:19:20 +02:00
|
|
|
'';
|
|
|
|
|
2018-09-02 20:15:01 +02:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2019-12-04 10:20:00 +01:00
|
|
|
passthru.updateScript = deepin.updateScript { name = "${pname}-${version}"; };
|
2018-10-30 23:17:45 +01:00
|
|
|
|
2018-09-01 13:19:20 +02:00
|
|
|
meta = with stdenv.lib; {
|
2019-11-12 02:08:40 +01:00
|
|
|
description = "Deepin tool kit core library";
|
2018-09-01 13:19:20 +02:00
|
|
|
homepage = https://github.com/linuxdeepin/dtkcore;
|
|
|
|
license = licenses.gpl3;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with maintainers; [ romildo ];
|
|
|
|
};
|
|
|
|
}
|