1- { lib , fetchFromGitHub , python3Packages , libsForQt5 , ghostscript , qt5 } :
1+ {
2+ lib ,
3+ fetchFromGitHub ,
4+ python3 ,
5+ libsForQt5 ,
6+ ghostscript ,
7+ qt5 ,
8+ fetchPypi ,
9+ } :
210
3- python3Packages . buildPythonApplication rec {
11+ 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 {
430 pname = "krop" ;
531 version = "0.6.0" ;
632
@@ -11,21 +37,21 @@ python3Packages.buildPythonApplication rec {
1137 sha256 = "1ygzc7vlwszqmsd3v1dsqp1dpsn6inx7g8gck63alvf88dbn8m3s" ;
1238 } ;
1339
14- propagatedBuildInputs = with python3Packages ; [
40+ propagatedBuildInputs = with py . pkgs ; [
1541 pyqt5
1642 pypdf2
1743 poppler-qt5
1844 ghostscript
1945 ] ;
46+
2047 buildInputs = [
2148 libsForQt5 . poppler
2249 libsForQt5 . qtwayland
2350 ] ;
2451
2552 nativeBuildInputs = [ qt5 . wrapQtAppsHook ] ;
26- makeWrapperArgs = [
27- "\ ${qtWrapperArgs[@]}"
28- ] ;
53+
54+ makeWrapperArgs = [ "\ ${qtWrapperArgs[@]}" ] ;
2955
3056 postInstall = ''
3157 install -m666 -Dt $out/share/applications krop.desktop
@@ -37,17 +63,17 @@ python3Packages.buildPythonApplication rec {
3763 meta = {
3864 homepage = "http://arminstraub.com/software/krop" ;
3965 description = "Graphical tool to crop the pages of PDF files" ;
40- mainProgram = "krop" ;
4166 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.
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.
4873 '' ;
4974 license = lib . licenses . gpl3Plus ;
5075 maintainers = with lib . maintainers ; [ leenaars ] ;
5176 platforms = lib . platforms . linux ;
77+ mainProgram = "krop" ;
5278 } ;
5379}
0 commit comments