From f0eb6d2059d307ff1a8fa2758b23bf2cdcde9897 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Sat, 28 May 2022 22:23:56 +0000 Subject: [PATCH 1/2] python310Packages.pikepdf: fix build on aarch64-darwin --- pkgs/development/python-modules/pikepdf/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/development/python-modules/pikepdf/default.nix b/pkgs/development/python-modules/pikepdf/default.nix index aa5a66826cbe8..b3d34d823361b 100644 --- a/pkgs/development/python-modules/pikepdf/default.nix +++ b/pkgs/development/python-modules/pikepdf/default.nix @@ -51,6 +51,10 @@ buildPythonPackage rec { }) ]; + postPatch = '' + sed -i 's|\S*/opt/homebrew.*|pass|' setup.py + ''; + SETUPTOOLS_SCM_PRETEND_VERSION = version; buildInputs = [ From 65450988a59dc253a93148e6d9cd739a0e9e2083 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Sat, 28 May 2022 23:57:50 +0000 Subject: [PATCH 2/2] python310Packages.ocrmypdf: fix build on Darwin With enabled sandbox we get PermissionError: [Errno 1] Operation not permitted when calling os.nice(). --- pkgs/development/python-modules/ocrmypdf/default.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkgs/development/python-modules/ocrmypdf/default.nix b/pkgs/development/python-modules/ocrmypdf/default.nix index 1a427dc379fd3..738a5e43a02f1 100644 --- a/pkgs/development/python-modules/ocrmypdf/default.nix +++ b/pkgs/development/python-modules/ocrmypdf/default.nix @@ -2,6 +2,7 @@ , buildPythonPackage , coloredlogs , fetchFromGitHub +, fetchpatch , ghostscript , img2pdf , importlib-metadata @@ -53,6 +54,11 @@ buildPythonPackage rec { tesseract = "${lib.getBin tesseract4}/bin/tesseract"; unpaper = "${lib.getBin unpaper}/bin/unpaper"; }) + # https://github.com/ocrmypdf/OCRmyPDF/pull/973 + (fetchpatch { + url = "https://github.com/ocrmypdf/OCRmyPDF/commit/808b24d59f5b541a335006aa6ea7cdc3c991adc0.patch"; + hash = "sha256-khsH70fWk5fStf94wcRKKX7cCbgD69LtKkngJIqA3+w="; + }) ]; nativeBuildInputs = [