2019-07-22 03:53:18 +01:00
|
|
|
{ stdenv, mkDerivation, fetchFromGitHub, pkgconfig, qmake, gsettings-qt, pythonPackages, deepin }:
|
2018-09-01 12:19:20 +01:00
|
|
|
|
2019-07-22 03:53:18 +01:00
|
|
|
mkDerivation rec {
|
2018-09-01 12:19:20 +01:00
|
|
|
pname = "dtkcore";
|
2019-06-22 13:26:34 +01:00
|
|
|
version = "2.0.14";
|
2018-09-01 12:19:20 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "linuxdeepin";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2019-06-22 13:26:34 +01:00
|
|
|
sha256 = "0yc6zx8rhzg9mj2brggcsr1jy1pzfvgqy1h305y2dwnx5haazd04";
|
2018-09-01 12:19:20 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
pkgconfig
|
|
|
|
qmake
|
|
|
|
pythonPackages.wrapPython
|
2019-05-04 12:42:00 +01:00
|
|
|
deepin.setupHook
|
2018-09-01 12:19:20 +01:00
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
gsettings-qt
|
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
2019-05-04 12:42:00 +01:00
|
|
|
searchHardCodedPaths # debugging
|
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,"
|
|
|
|
'';
|
|
|
|
|
2019-06-26 02:26:16 +01:00
|
|
|
qmakeFlags = [
|
|
|
|
"DTK_VERSION=${version}"
|
|
|
|
"MKSPECS_INSTALL_DIR=${placeholder "out"}/mkspecs"
|
|
|
|
];
|
2018-09-01 12:19:20 +01:00
|
|
|
|
|
|
|
postFixup = ''
|
|
|
|
chmod +x $out/lib/dtk2/*.py
|
|
|
|
wrapPythonProgramsIn "$out/lib/dtk2" "$out $pythonPath"
|
2019-05-04 12:42:00 +01:00
|
|
|
searchHardCodedPaths $out # debugging
|
2018-09-01 12:19:20 +01:00
|
|
|
'';
|
|
|
|
|
2018-09-02 19:15:01 +01:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2019-08-15 13:41:18 +01:00
|
|
|
passthru.updateScript = deepin.updateScript { inherit ;name = "${pname}-${version}"; };
|
2018-10-30 22:17:45 +00:00
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|