krop: pin pypdf2 version (#357570)
This commit is contained in:
commit
7069636733
@ -1,6 +1,32 @@
|
|||||||
{ lib, fetchFromGitHub, python3Packages, libsForQt5, ghostscript, qt5}:
|
{
|
||||||
|
lib,
|
||||||
|
fetchFromGitHub,
|
||||||
|
python3,
|
||||||
|
libsForQt5,
|
||||||
|
ghostscript,
|
||||||
|
qt5,
|
||||||
|
fetchPypi,
|
||||||
|
}:
|
||||||
|
|
||||||
python3Packages.buildPythonApplication rec {
|
let
|
||||||
|
py = python3.override {
|
||||||
|
self = py;
|
||||||
|
packageOverrides = self: super: {
|
||||||
|
# Can be removed once this is merged
|
||||||
|
# https://github.com/arminstraub/krop/pull/40
|
||||||
|
pypdf2 = super.pypdf2.overridePythonAttrs (oldAttrs: rec {
|
||||||
|
version = "2.12.1";
|
||||||
|
src = fetchPypi {
|
||||||
|
pname = "PyPDF2";
|
||||||
|
inherit version;
|
||||||
|
hash = "sha256-4D7xirzHXadBoKzBp3SSU0loh744zZiHvM4c7jk9pF4=";
|
||||||
|
};
|
||||||
|
});
|
||||||
|
};
|
||||||
|
};
|
||||||
|
in
|
||||||
|
|
||||||
|
py.pkgs.buildPythonApplication rec {
|
||||||
pname = "krop";
|
pname = "krop";
|
||||||
version = "0.6.0";
|
version = "0.6.0";
|
||||||
|
|
||||||
@ -11,21 +37,21 @@ python3Packages.buildPythonApplication rec {
|
|||||||
sha256 = "1ygzc7vlwszqmsd3v1dsqp1dpsn6inx7g8gck63alvf88dbn8m3s";
|
sha256 = "1ygzc7vlwszqmsd3v1dsqp1dpsn6inx7g8gck63alvf88dbn8m3s";
|
||||||
};
|
};
|
||||||
|
|
||||||
propagatedBuildInputs = with python3Packages; [
|
propagatedBuildInputs = with py.pkgs; [
|
||||||
pyqt5
|
pyqt5
|
||||||
pypdf2
|
pypdf2
|
||||||
poppler-qt5
|
poppler-qt5
|
||||||
ghostscript
|
ghostscript
|
||||||
];
|
];
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
libsForQt5.poppler
|
libsForQt5.poppler
|
||||||
libsForQt5.qtwayland
|
libsForQt5.qtwayland
|
||||||
];
|
];
|
||||||
|
|
||||||
nativeBuildInputs = [ qt5.wrapQtAppsHook ];
|
nativeBuildInputs = [ qt5.wrapQtAppsHook ];
|
||||||
makeWrapperArgs = [
|
|
||||||
"\${qtWrapperArgs[@]}"
|
makeWrapperArgs = [ "\${qtWrapperArgs[@]}" ];
|
||||||
];
|
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
install -m666 -Dt $out/share/applications krop.desktop
|
install -m666 -Dt $out/share/applications krop.desktop
|
||||||
@ -37,17 +63,17 @@ python3Packages.buildPythonApplication rec {
|
|||||||
meta = {
|
meta = {
|
||||||
homepage = "http://arminstraub.com/software/krop";
|
homepage = "http://arminstraub.com/software/krop";
|
||||||
description = "Graphical tool to crop the pages of PDF files";
|
description = "Graphical tool to crop the pages of PDF files";
|
||||||
mainProgram = "krop";
|
|
||||||
longDescription = ''
|
longDescription = ''
|
||||||
Krop is a tool that allows you to optimise your PDF files, and remove
|
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
|
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
|
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
|
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
|
your eReader does not support convenient scrolling. Krop also has a command line
|
||||||
interface.
|
interface.
|
||||||
'';
|
'';
|
||||||
license = lib.licenses.gpl3Plus;
|
license = lib.licenses.gpl3Plus;
|
||||||
maintainers = with lib.maintainers; [ leenaars ];
|
maintainers = with lib.maintainers; [ leenaars ];
|
||||||
platforms = lib.platforms.linux;
|
platforms = lib.platforms.linux;
|
||||||
|
mainProgram = "krop";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user