nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at 22.05 65 lines 1.1 kB view raw
1{ lib 2, buildPythonPackage 3, isPy27 4, fetchPypi 5, pikepdf 6, pillow 7, stdenv 8, exiftool 9, ghostscript 10, imagemagick 11, mupdf 12, netpbm 13, numpy 14, poppler_utils 15, pytestCheckHook 16, scipy 17}: 18 19buildPythonPackage rec { 20 pname = "img2pdf"; 21 version = "0.4.4"; 22 disabled = isPy27; 23 24 src = fetchPypi { 25 inherit pname version; 26 sha256 = "8ec898a9646523fd3862b154f3f47cd52609c24cc3e2dc1fb5f0168f0cbe793c"; 27 }; 28 29 propagatedBuildInputs = [ 30 pikepdf 31 pillow 32 ]; 33 34 # https://gitlab.mister-muffin.de/josch/img2pdf/issues/128 35 doCheck = !stdenv.isAarch64; 36 37 checkInputs = [ 38 exiftool 39 ghostscript 40 imagemagick 41 mupdf 42 netpbm 43 numpy 44 poppler_utils 45 pytestCheckHook 46 scipy 47 ]; 48 49 preCheck = '' 50 export img2pdfprog="$out/bin/img2pdf" 51 ''; 52 53 disabledTests = [ 54 "test_tiff_rgb" 55 ]; 56 57 pythonImportsCheck = [ "img2pdf" ]; 58 59 meta = with lib; { 60 description = "Convert images to PDF via direct JPEG inclusion"; 61 homepage = "https://gitlab.mister-muffin.de/josch/img2pdf"; 62 license = licenses.lgpl2; 63 maintainers = with maintainers; [ veprbl dotlambda ]; 64 }; 65}