···11-{ lib, fetchFromGitHub, python3Packages, libsForQt5, ghostscript, qt5}:
11+{
22+ lib,
33+ fetchFromGitHub,
44+ python3,
55+ libsForQt5,
66+ ghostscript,
77+ qt5,
88+ fetchPypi,
99+}:
21033-python3Packages.buildPythonApplication rec {
1111+let
1212+ py = python3.override {
1313+ self = py;
1414+ packageOverrides = self: super: {
1515+ # Can be removed once this is merged
1616+ # https://github.com/arminstraub/krop/pull/40
1717+ pypdf2 = super.pypdf2.overridePythonAttrs (oldAttrs: rec {
1818+ version = "2.12.1";
1919+ src = fetchPypi {
2020+ pname = "PyPDF2";
2121+ inherit version;
2222+ hash = "sha256-4D7xirzHXadBoKzBp3SSU0loh744zZiHvM4c7jk9pF4=";
2323+ };
2424+ });
2525+ };
2626+ };
2727+in
2828+2929+py.pkgs.buildPythonApplication rec {
430 pname = "krop";
531 version = "0.6.0";
632···1137 sha256 = "1ygzc7vlwszqmsd3v1dsqp1dpsn6inx7g8gck63alvf88dbn8m3s";
1238 };
13391414- propagatedBuildInputs = with python3Packages; [
4040+ propagatedBuildInputs = with py.pkgs; [
1541 pyqt5
1642 pypdf2
1743 poppler-qt5
1844 ghostscript
1945 ];
4646+2047 buildInputs = [
2148 libsForQt5.poppler
2249 libsForQt5.qtwayland
2350 ];
24512552 nativeBuildInputs = [ qt5.wrapQtAppsHook ];
2626- makeWrapperArgs = [
2727- "\${qtWrapperArgs[@]}"
2828- ];
5353+5454+ makeWrapperArgs = [ "\${qtWrapperArgs[@]}" ];
29553056 postInstall = ''
3157 install -m666 -Dt $out/share/applications krop.desktop
···3763 meta = {
3864 homepage = "http://arminstraub.com/software/krop";
3965 description = "Graphical tool to crop the pages of PDF files";
4040- mainProgram = "krop";
4166 longDescription = ''
4242- Krop is a tool that allows you to optimise your PDF files, and remove
4343- sections of the page you do not want. A unique feature of krop, at least to my
4444- knowledge, is its ability to automatically split pages into subpages to fit the
4545- limited screensize of devices such as eReaders. This is particularly useful, if
4646- your eReader does not support convenient scrolling. Krop also has a command line
4747- interface.
6767+ Krop is a tool that allows you to optimise your PDF files, and remove
6868+ sections of the page you do not want. A unique feature of krop, at least to my
6969+ knowledge, is its ability to automatically split pages into subpages to fit the
7070+ limited screensize of devices such as eReaders. This is particularly useful, if
7171+ your eReader does not support convenient scrolling. Krop also has a command line
7272+ interface.
4873 '';
4974 license = lib.licenses.gpl3Plus;
5075 maintainers = with lib.maintainers; [ leenaars ];
5176 platforms = lib.platforms.linux;
7777+ mainProgram = "krop";
5278 };
5379}