mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-24 13:53:24 +00:00
Merge pull request #265752 from al3xtjames/img2pdf-icc-path
python311Packages.img2pdf: fix evaluation on darwin
This commit is contained in:
commit
0d93ec62e0
@ -14,7 +14,7 @@ index 036232b..d2e7829 100755
|
|||||||
- if os.path.exists(profile):
|
- if os.path.exists(profile):
|
||||||
- return profile
|
- return profile
|
||||||
- return "/usr/share/color/icc/sRGB.icc"
|
- return "/usr/share/color/icc/sRGB.icc"
|
||||||
+ return "@colord@/share/color/icc/colord/sRGB.icc"
|
+ return "@srgbProfile@"
|
||||||
|
|
||||||
|
|
||||||
def get_main_parser():
|
def get_main_parser():
|
||||||
|
@ -38,7 +38,10 @@ buildPythonPackage rec {
|
|||||||
patches = [
|
patches = [
|
||||||
(substituteAll {
|
(substituteAll {
|
||||||
src = ./default-icc-profile.patch;
|
src = ./default-icc-profile.patch;
|
||||||
inherit colord;
|
srgbProfile = if stdenv.isDarwin then
|
||||||
|
"/System/Library/ColorSync/Profiles/sRGB Profile.icc"
|
||||||
|
else
|
||||||
|
"${colord}/share/color/icc/colord/sRGB.icc";
|
||||||
})
|
})
|
||||||
(fetchpatch {
|
(fetchpatch {
|
||||||
# https://gitlab.mister-muffin.de/josch/img2pdf/issues/178
|
# https://gitlab.mister-muffin.de/josch/img2pdf/issues/178
|
||||||
@ -57,6 +60,12 @@ buildPythonPackage rec {
|
|||||||
pillow
|
pillow
|
||||||
];
|
];
|
||||||
|
|
||||||
|
# FIXME: Only add "sRGB Profile.icc" to __impureHostDeps once
|
||||||
|
# https://github.com/NixOS/nix/issues/9301 is fixed.
|
||||||
|
__impureHostDeps = lib.optionals stdenv.isDarwin [
|
||||||
|
"/System/Library/ColorSync/Profiles"
|
||||||
|
];
|
||||||
|
|
||||||
nativeCheckInputs = [
|
nativeCheckInputs = [
|
||||||
exiftool
|
exiftool
|
||||||
ghostscript
|
ghostscript
|
||||||
|
Loading…
Reference in New Issue
Block a user