···1-{ lib, fetchFromGitHub, python3Packages, libsForQt5, ghostscript, qt5}:
0000000023-python3Packages.buildPythonApplication rec {
0000000000000000004 pname = "krop";
5 version = "0.6.0";
6···11 sha256 = "1ygzc7vlwszqmsd3v1dsqp1dpsn6inx7g8gck63alvf88dbn8m3s";
12 };
1314- propagatedBuildInputs = with python3Packages; [
15 pyqt5
16 pypdf2
17 poppler-qt5
18 ghostscript
19 ];
020 buildInputs = [
21 libsForQt5.poppler
22 libsForQt5.qtwayland
23 ];
2425 nativeBuildInputs = [ qt5.wrapQtAppsHook ];
26- makeWrapperArgs = [
27- "\${qtWrapperArgs[@]}"
28- ];
2930 postInstall = ''
31 install -m666 -Dt $out/share/applications krop.desktop
···37 meta = {
38 homepage = "http://arminstraub.com/software/krop";
39 description = "Graphical tool to crop the pages of PDF files";
40- mainProgram = "krop";
41 longDescription = ''
42- Krop is a tool that allows you to optimise your PDF files, and remove
43- sections of the page you do not want. A unique feature of krop, at least to my
44- knowledge, is its ability to automatically split pages into subpages to fit the
45- limited screensize of devices such as eReaders. This is particularly useful, if
46- your eReader does not support convenient scrolling. Krop also has a command line
47- interface.
48 '';
49 license = lib.licenses.gpl3Plus;
50 maintainers = with lib.maintainers; [ leenaars ];
51 platforms = lib.platforms.linux;
052 };
53}
···1+{
2+ lib,
3+ fetchFromGitHub,
4+ python3,
5+ libsForQt5,
6+ ghostscript,
7+ qt5,
8+ fetchPypi,
9+}:
1011+let
12+ py = python3.override {
13+ self = py;
14+ packageOverrides = self: super: {
15+ # Can be removed once this is merged
16+ # https://github.com/arminstraub/krop/pull/40
17+ pypdf2 = super.pypdf2.overridePythonAttrs (oldAttrs: rec {
18+ version = "2.12.1";
19+ src = fetchPypi {
20+ pname = "PyPDF2";
21+ inherit version;
22+ hash = "sha256-4D7xirzHXadBoKzBp3SSU0loh744zZiHvM4c7jk9pF4=";
23+ };
24+ });
25+ };
26+ };
27+in
28+29+py.pkgs.buildPythonApplication rec {
30 pname = "krop";
31 version = "0.6.0";
32···37 sha256 = "1ygzc7vlwszqmsd3v1dsqp1dpsn6inx7g8gck63alvf88dbn8m3s";
38 };
3940+ propagatedBuildInputs = with py.pkgs; [
41 pyqt5
42 pypdf2
43 poppler-qt5
44 ghostscript
45 ];
46+47 buildInputs = [
48 libsForQt5.poppler
49 libsForQt5.qtwayland
50 ];
5152 nativeBuildInputs = [ qt5.wrapQtAppsHook ];
53+54+ makeWrapperArgs = [ "\${qtWrapperArgs[@]}" ];
05556 postInstall = ''
57 install -m666 -Dt $out/share/applications krop.desktop
···63 meta = {
64 homepage = "http://arminstraub.com/software/krop";
65 description = "Graphical tool to crop the pages of PDF files";
066 longDescription = ''
67+ Krop is a tool that allows you to optimise your PDF files, and remove
68+ sections of the page you do not want. A unique feature of krop, at least to my
69+ knowledge, is its ability to automatically split pages into subpages to fit the
70+ limited screensize of devices such as eReaders. This is particularly useful, if
71+ your eReader does not support convenient scrolling. Krop also has a command line
72+ interface.
73 '';
74 license = lib.licenses.gpl3Plus;
75 maintainers = with lib.maintainers; [ leenaars ];
76 platforms = lib.platforms.linux;
77+ mainProgram = "krop";
78 };
79}