diff --git a/pkgs/development/python-modules/reportlab/darwin-m1-compat.patch b/pkgs/development/python-modules/reportlab/darwin-m1-compat.patch new file mode 100644 index 000000000000..5c9d4404f97e --- /dev/null +++ b/pkgs/development/python-modules/reportlab/darwin-m1-compat.patch @@ -0,0 +1,13 @@ +diff --git a/setup.py b/setup.py +index 7625074..b3aa2fc 100644 +--- a/setup.py ++++ b/setup.py +@@ -249,7 +249,7 @@ class inc_lib_dirs: + aDir(L, os.path.join("/usr/lib", "python%s" % sys.version[:3], "config")) + elif platform == "darwin": + machine = sysconfig_platform.split('-')[-1] +- if machine=='arm64' or os.environ.get('ARCHFLAGS','')=='-arch arm64': ++ if False and machine=='arm64' or os.environ.get('ARCHFLAGS','')=='-arch arm64': + #print('!!!!! detected darwin arm64 build') + #probably an M1 + target = pjoin( diff --git a/pkgs/development/python-modules/reportlab/default.nix b/pkgs/development/python-modules/reportlab/default.nix index 58b80d89c8e6..7a58aaddaace 100644 --- a/pkgs/development/python-modules/reportlab/default.nix +++ b/pkgs/development/python-modules/reportlab/default.nix @@ -19,6 +19,10 @@ in buildPythonPackage rec { sha256 = "sha256-BPxEIPBUiBXQYj4DHIah9/PzAD5pnZr3FIdC4tcrAko="; }; + patches = [ + ./darwin-m1-compat.patch + ]; + checkInputs = [ glibcLocales ]; buildInputs = [ ft pillow ];