2019-07-22 04:53:18 +02:00
|
|
|
{ stdenv, mkDerivation, fetchFromGitHub, fetchpatch, cmake, pkgconfig, xdg_utils, qttools, qtx11extras,
|
2018-12-19 02:21:26 +01:00
|
|
|
dtkcore, dtkwidget, dtkwm, deepin-turbo, deepin-shortcut-viewer,
|
|
|
|
deepin }:
|
|
|
|
|
2019-07-22 04:53:18 +02:00
|
|
|
mkDerivation rec {
|
2018-12-19 02:21:26 +01:00
|
|
|
pname = "deepin-screenshot";
|
2019-06-22 14:26:34 +02:00
|
|
|
version = "4.2.1";
|
2018-12-19 02:21:26 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "linuxdeepin";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2019-06-22 14:26:34 +02:00
|
|
|
sha256 = "16wy1ywp4lm7fg488laqxgxpir745rbpj9z410r6x7krpgjds189";
|
2018-12-19 02:21:26 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake
|
|
|
|
pkgconfig
|
|
|
|
qttools
|
|
|
|
deepin.setupHook
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
deepin-shortcut-viewer
|
|
|
|
deepin-turbo
|
|
|
|
dtkcore
|
|
|
|
dtkwidget
|
|
|
|
dtkwm
|
|
|
|
qtx11extras
|
|
|
|
];
|
|
|
|
|
|
|
|
patches = [
|
|
|
|
(fetchpatch {
|
|
|
|
url = https://github.com/linuxdeepin/deepin-screenshot/pull/52/commits/e14508b223fd9965854ed41c944cea2ea19e6e0c.patch;
|
|
|
|
sha256 = "18zvz98z3hr8pcdyb706za6h2nwx23zsjb1hgyp21ycinhzr9j9h";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
2019-04-14 01:23:42 +02:00
|
|
|
searchHardCodedPaths
|
2018-12-19 02:21:26 +01:00
|
|
|
patchShebangs generate_translations.sh
|
|
|
|
fixPath ${deepin-turbo} /usr/bin/deepin-turbo-invoker src/dbusservice/com.deepin.Screenshot.service
|
2019-04-14 01:09:42 +02:00
|
|
|
fixPath $out /usr/bin/deepin-screenshot src/dbusservice/com.deepin.Screenshot.service
|
2018-12-19 02:21:26 +01:00
|
|
|
substituteInPlace src/mainwindow.cpp --replace '"xdg-open,%1"' '"${xdg_utils}/bin/xdg-open,%1"'
|
|
|
|
'';
|
|
|
|
|
2019-04-14 01:23:42 +02:00
|
|
|
postFixup = ''
|
|
|
|
searchHardCodedPaths $out
|
|
|
|
'';
|
|
|
|
|
2019-08-15 14:41:18 +02:00
|
|
|
passthru.updateScript = deepin.updateScript { inherit ;name = "${pname}-${version}"; };
|
2018-12-19 02:21:26 +01:00
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Easy-to-use screenshot tool for Deepin Desktop Environment";
|
|
|
|
homepage = https://github.com/linuxdeepin/deepin-screenshot;
|
|
|
|
license = licenses.gpl3;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with maintainers; [ romildo flokli ];
|
|
|
|
};
|
|
|
|
}
|