generated from nix-community/nur-packages-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
krop.nix
61 lines (53 loc) · 1.76 KB
/
krop.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
{ lib, fetchFromGitHub, python3Packages, libsForQt5, ghostscript, qt5}:
python3Packages.buildPythonApplication rec {
pname = "krop";
version = "0.6.1";
src = fetchFromGitHub {
owner = "arminstraub";
repo = pname;
#rev = "v${version}";
#sha256 = "1ygzc7vlwszqmsd3v1dsqp1dpsn6inx7g8gck63alvf88dbn8m3s";
rev = "e96d42b2f1ab4317efe37cab498b708663bc104c";
sha256 = "sha256-TYR214ZQsAhf6P1Mw6zjRyopPxs4f3RhPa9rKA0cK8w=";
};
patches = [
# https://github.com/arminstraub/krop/pull/40
./fix-import-pypdf2.patch
];
propagatedBuildInputs = with python3Packages; [
pyqt5
pypdf2
pikepdf # krop --use-pikepdf
pymupdf # krop --use-pymupdf
poppler-qt5
ghostscript
];
buildInputs = [
libsForQt5.poppler
libsForQt5.qtwayland
];
nativeBuildInputs = [ qt5.wrapQtAppsHook ];
makeWrapperArgs = [
"\${qtWrapperArgs[@]}"
];
postInstall = ''
install -m666 -Dt $out/share/applications krop.desktop
'';
# Disable checks because of interference with older Qt versions // xcb
doCheck = false;
meta = {
homepage = "http://arminstraub.com/software/krop";
description = "Graphical tool to crop the pages of PDF files";
longDescription = ''
Krop is a tool that allows you to optimise your PDF files, and remove
sections of the page you do not want. A unique feature of krop, at least to my
knowledge, is its ability to automatically split pages into subpages to fit the
limited screensize of devices such as eReaders. This is particularly useful, if
your eReader does not support convenient scrolling. Krop also has a command line
interface.
'';
license = lib.licenses.gpl3Plus;
maintainers = with lib.maintainers; [ leenaars ];
platforms = lib.platforms.linux;
};
}