Files
nixpkgs/pkgs/development/python-modules/img2pdf/default-icc-profile.patch
T
Alex James 12cc200d43 python311Packages.img2pdf: fix evaluation on darwin
The img2pdf derivation uses the sRGB ICC profile provided by colord
starting with #264119. colord and several of its dependencies only
support Linux, so this broke evaluation on Darwin. This change drops the
use of colord on Darwin to fix the derivation; the system-provided sRGB
profile is used instead.
2023-11-05 18:52:45 -06:00

21 lines
523 B
Diff

diff --git a/src/img2pdf.py b/src/img2pdf.py
index 036232b..d2e7829 100755
--- a/src/img2pdf.py
+++ b/src/img2pdf.py
@@ -3815,14 +3815,7 @@ def gui():
def get_default_icc_profile():
- for profile in [
- "/usr/share/color/icc/sRGB.icc",
- "/usr/share/color/icc/OpenICC/sRGB.icc",
- "/usr/share/color/icc/colord/sRGB.icc",
- ]:
- if os.path.exists(profile):
- return profile
- return "/usr/share/color/icc/sRGB.icc"
+ return "@srgbProfile@"
def get_main_parser():