lol

Merge pull request #265752 from al3xtjames/img2pdf-icc-path

python311Packages.img2pdf: fix evaluation on darwin

authored by

Robert Schütz and committed by
GitHub
0d93ec62 eb5caed9

+11 -2
+1 -1
pkgs/development/python-modules/img2pdf/default-icc-profile.patch
··· 14 14 - if os.path.exists(profile): 15 15 - return profile 16 16 - return "/usr/share/color/icc/sRGB.icc" 17 - + return "@colord@/share/color/icc/colord/sRGB.icc" 17 + + return "@srgbProfile@" 18 18 19 19 20 20 def get_main_parser():
+10 -1
pkgs/development/python-modules/img2pdf/default.nix
··· 38 38 patches = [ 39 39 (substituteAll { 40 40 src = ./default-icc-profile.patch; 41 - inherit colord; 41 + srgbProfile = if stdenv.isDarwin then 42 + "/System/Library/ColorSync/Profiles/sRGB Profile.icc" 43 + else 44 + "${colord}/share/color/icc/colord/sRGB.icc"; 42 45 }) 43 46 (fetchpatch { 44 47 # https://gitlab.mister-muffin.de/josch/img2pdf/issues/178 ··· 55 58 propagatedBuildInputs = [ 56 59 pikepdf 57 60 pillow 61 + ]; 62 + 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" 58 67 ]; 59 68 60 69 nativeCheckInputs = [