2021-01-25 08:26:54 +00:00
|
|
|
{ lib, fetchFromGitHub, python3Packages, libsForQt5, ghostscript, qt5}:
|
2018-06-24 20:38:47 +00:00
|
|
|
|
|
|
|
python3Packages.buildPythonApplication rec {
|
|
|
|
pname = "krop";
|
2020-06-16 06:43:29 +00:00
|
|
|
version = "0.6.0";
|
2018-06-24 20:38:47 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "arminstraub";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2020-06-16 06:43:29 +00:00
|
|
|
sha256 = "1ygzc7vlwszqmsd3v1dsqp1dpsn6inx7g8gck63alvf88dbn8m3s";
|
2018-06-24 20:38:47 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = with python3Packages; [
|
|
|
|
pyqt5
|
|
|
|
pypdf2
|
|
|
|
poppler-qt5
|
|
|
|
ghostscript
|
|
|
|
];
|
2020-06-16 20:02:48 +00:00
|
|
|
buildInputs = [
|
|
|
|
libsForQt5.poppler
|
2023-08-07 05:29:32 +00:00
|
|
|
libsForQt5.qtwayland
|
2020-06-16 20:02:48 +00:00
|
|
|
];
|
2018-06-24 20:38:47 +00:00
|
|
|
|
2020-01-09 04:00:18 +00:00
|
|
|
nativeBuildInputs = [ qt5.wrapQtAppsHook ];
|
|
|
|
makeWrapperArgs = [
|
|
|
|
"\${qtWrapperArgs[@]}"
|
|
|
|
];
|
|
|
|
|
2020-05-08 12:00:00 +00:00
|
|
|
postInstall = ''
|
|
|
|
install -m666 -Dt $out/share/applications krop.desktop
|
|
|
|
'';
|
|
|
|
|
2018-06-24 20:38:47 +00:00
|
|
|
# Disable checks because of interference with older Qt versions // xcb
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
meta = {
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "http://arminstraub.com/software/krop";
|
2018-06-24 20:38:47 +00:00
|
|
|
description = "Graphical tool to crop the pages of PDF files";
|
2024-03-19 02:14:51 +00:00
|
|
|
mainProgram = "krop";
|
2018-06-24 20:38:47 +00:00
|
|
|
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.
|
|
|
|
'';
|
2021-01-15 13:21:58 +00:00
|
|
|
license = lib.licenses.gpl3Plus;
|
|
|
|
maintainers = with lib.maintainers; [ leenaars ];
|
|
|
|
platforms = lib.platforms.linux;
|
2018-06-24 20:38:47 +00:00
|
|
|
};
|
|
|
|
}
|