···1+{ stdenv, fetchFromGitHub, python3Packages, libsForQt5, ghostscript }:
2+3+python3Packages.buildPythonApplication rec {
4+ pname = "krop";
5+ version = "0.5.0";
6+7+ src = fetchFromGitHub {
8+ owner = "arminstraub";
9+ repo = pname;
10+ rev = "v${version}";
11+ sha256 = "0y8z9xr10wbzmi1dg1zpcsf3ihnxrnvlaf72821x3390s3qsnydf";
12+ };
13+14+ propagatedBuildInputs = with python3Packages; [
15+ pyqt5
16+ pypdf2
17+ poppler-qt5
18+ libsForQt5.poppler
19+ ghostscript
20+ ];
21+22+ # Disable checks because of interference with older Qt versions // xcb
23+ doCheck = false;
24+25+ meta = {
26+ homepage = http://arminstraub.com/software/krop;
27+ description = "Graphical tool to crop the pages of PDF files";
28+ longDescription = ''
29+ Krop is a tool that allows you to optimise your PDF files, and remove
30+ sections of the page you do not want. A unique feature of krop, at least to my
31+ knowledge, is its ability to automatically split pages into subpages to fit the
32+ limited screensize of devices such as eReaders. This is particularly useful, if
33+ your eReader does not support convenient scrolling. Krop also has a command line
34+ interface.
35+ '';
36+ license = stdenv.lib.licenses.gpl3Plus;
37+ maintainers = with stdenv.lib.maintainers; [ leenaars ];
38+ platforms = stdenv.lib.platforms.linux;
39+ };
40+}