about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/img2pdf/default.nix
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2023-11-16 12:53:32 +0100
committerAlyssa Ross <hi@alyssa.is>2023-11-16 12:53:32 +0100
commit67419f0e56f99b0ebbe14574d3492110ac84c8d6 (patch)
tree3abc8e1606a2c80b6f5d14fef175e50800202163 /nixpkgs/pkgs/development/python-modules/img2pdf/default.nix
parenta2c1eff83c3118a9aee8076c7f84f58137416b6e (diff)
parent9008bc4eb62c878d0812105ea1b34255d651df88 (diff)
downloadnixlib-67419f0e56f99b0ebbe14574d3492110ac84c8d6.tar
nixlib-67419f0e56f99b0ebbe14574d3492110ac84c8d6.tar.gz
nixlib-67419f0e56f99b0ebbe14574d3492110ac84c8d6.tar.bz2
nixlib-67419f0e56f99b0ebbe14574d3492110ac84c8d6.tar.lz
nixlib-67419f0e56f99b0ebbe14574d3492110ac84c8d6.tar.xz
nixlib-67419f0e56f99b0ebbe14574d3492110ac84c8d6.tar.zst
nixlib-67419f0e56f99b0ebbe14574d3492110ac84c8d6.zip
Merge branch 'nixos-unstable-small' of https://github.com/NixOS/nixpkgs into HEAD
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/img2pdf/default.nix')
-rw-r--r--nixpkgs/pkgs/development/python-modules/img2pdf/default.nix11
1 files changed, 10 insertions, 1 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/img2pdf/default.nix b/nixpkgs/pkgs/development/python-modules/img2pdf/default.nix
index 06183b3d5348..a94681ada0f1 100644
--- a/nixpkgs/pkgs/development/python-modules/img2pdf/default.nix
+++ b/nixpkgs/pkgs/development/python-modules/img2pdf/default.nix
@@ -38,7 +38,10 @@ buildPythonPackage rec {
   patches = [
     (substituteAll {
       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 {
       # https://gitlab.mister-muffin.de/josch/img2pdf/issues/178
@@ -57,6 +60,12 @@ buildPythonPackage rec {
     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 = [
     exiftool
     ghostscript