23 buildPythonPackage rec {
30 src = fetchFromGitea {
31 domain = "gitlab.mister-muffin.de";
35 hash = "sha256-k0GqBTS8PvYDmjzyLCSdQB7oBakrEQYJcQykDNrzgcA=";
40 src = ./default-icc-profile.patch;
41 srgbProfile = if stdenv.isDarwin then
42 "/System/Library/ColorSync/Profiles/sRGB Profile.icc"
44 "${colord}/share/color/icc/colord/sRGB.icc";
47 # https://gitlab.mister-muffin.de/josch/img2pdf/issues/178
48 url = "https://salsa.debian.org/debian/img2pdf/-/raw/4a7dbda0f473f7c5ffcaaf68ea4ad3f435e0920d/debian/patches/fix_tests.patch";
49 hash = "sha256-A1zK6yINhS+dvyckZjqoSO1XJRTaf4OXFdq5ufUrBs8=";
58 propagatedBuildInputs = [
63 # FIXME: Only add "sRGB Profile.icc" to __impureHostDeps once
64 # https://github.com/NixOS/nix/issues/9301 is fixed.
65 __impureHostDeps = lib.optionals stdenv.isDarwin [
66 "/System/Library/ColorSync/Profiles"
82 export img2pdfprog="$out/bin/img2pdf"
86 # https://gitlab.mister-muffin.de/josch/img2pdf/issues/178
90 pythonImportsCheck = [ "img2pdf" ];
93 changelog = "https://gitlab.mister-muffin.de/josch/img2pdf/src/tag/${src.rev}/CHANGES.rst";
94 description = "Convert images to PDF via direct JPEG inclusion";
95 homepage = "https://gitlab.mister-muffin.de/josch/img2pdf";
96 license = licenses.lgpl3Plus;
97 mainProgram = "img2pdf";
98 maintainers = with maintainers; [ veprbl dotlambda ];