2022-01-13 20:06:32 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, isPy27
|
|
|
|
, fetchPypi
|
|
|
|
, pikepdf
|
|
|
|
, pillow
|
|
|
|
, stdenv
|
|
|
|
, exiftool
|
|
|
|
, ghostscript
|
|
|
|
, imagemagick
|
|
|
|
, mupdf
|
|
|
|
, netpbm
|
|
|
|
, numpy
|
|
|
|
, poppler_utils
|
|
|
|
, pytestCheckHook
|
|
|
|
, scipy
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-07-18 16:06:22 +00:00
|
|
|
buildPythonPackage rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "img2pdf";
|
2022-04-27 09:35:20 +00:00
|
|
|
version = "0.4.4";
|
2020-07-18 16:06:22 +00:00
|
|
|
disabled = isPy27;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2022-04-27 09:35:20 +00:00
|
|
|
sha256 = "8ec898a9646523fd3862b154f3f47cd52609c24cc3e2dc1fb5f0168f0cbe793c";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
2020-09-25 04:45:31 +00:00
|
|
|
pikepdf
|
2020-04-24 23:36:52 +00:00
|
|
|
pillow
|
|
|
|
];
|
|
|
|
|
2022-01-13 20:06:32 +00:00
|
|
|
# https://gitlab.mister-muffin.de/josch/img2pdf/issues/128
|
|
|
|
doCheck = !stdenv.isAarch64;
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
exiftool
|
|
|
|
ghostscript
|
|
|
|
imagemagick
|
|
|
|
mupdf
|
|
|
|
netpbm
|
|
|
|
numpy
|
|
|
|
poppler_utils
|
|
|
|
pytestCheckHook
|
|
|
|
scipy
|
|
|
|
];
|
|
|
|
|
|
|
|
preCheck = ''
|
|
|
|
export img2pdfprog="$out/bin/img2pdf"
|
|
|
|
'';
|
|
|
|
|
|
|
|
disabledTests = [
|
|
|
|
"test_tiff_rgb"
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "img2pdf" ];
|
2021-02-13 14:23:35 +00:00
|
|
|
|
2020-07-18 16:06:22 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Convert images to PDF via direct JPEG inclusion";
|
|
|
|
homepage = "https://gitlab.mister-muffin.de/josch/img2pdf";
|
|
|
|
license = licenses.lgpl2;
|
2022-01-13 20:06:32 +00:00
|
|
|
maintainers = with maintainers; [ veprbl dotlambda ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|