From 3e7992ba67ff4d6424879f2636857866229c952c Mon Sep 17 00:00:00 2001 From: Randy Eckenrode Date: Thu, 9 Nov 2023 20:44:18 -0500 Subject: [PATCH] python3Packages.aggdraw: fix build with clang 16 Clang 16 defaults to C++17, which disallows the `register` storage class specifier. Upstream has fixed this on a maintenance branch, but it is not yet available in a release. --- pkgs/development/python-modules/aggdraw/default.nix | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pkgs/development/python-modules/aggdraw/default.nix b/pkgs/development/python-modules/aggdraw/default.nix index 9d1e0ee96bab..ef44979c4394 100644 --- a/pkgs/development/python-modules/aggdraw/default.nix +++ b/pkgs/development/python-modules/aggdraw/default.nix @@ -1,5 +1,6 @@ { lib , fetchFromGitHub +, fetchpatch , buildPythonPackage , packaging , setuptools @@ -23,6 +24,14 @@ buildPythonPackage rec { hash = "sha256-2yajhuRyQ7BqghbSgPClW3inpw4TW2DhgQbomcRFx94="; }; + patches = [ + # Removes `register` storage class specifier, which is not allowed in C++17. + (fetchpatch { + url = "https://github.com/pytroll/aggdraw/commit/157ed49803567e8c3eeb7dfeff4c116db35747f7.patch"; + hash = "sha256-QSzpO90u5oSBWUzehRFbXgZ1ApEfLlfp11MUx6w11aI="; + }) + ]; + nativeBuildInputs = [ packaging setuptools