15 buildPythonPackage rec {
19 disabled = pythonOlder "3.6";
23 src = fetchFromGitHub {
26 rev = "refs/tags/v${version}";
27 hash = "sha256-P9AC8+WlokAxoy6KTJqAz7kOYK/FQVjIKWuj8jQw2OA=";
36 buildInputs = [ cairo ] ++ lib.optionals (pythonOlder "3.9") [ libxcrypt ];
38 nativeCheckInputs = [ pytestCheckHook ];
41 # This is only used for figuring out what version of Python is in
42 # use, and related stuff like figuring out what the install prefix
43 # should be, but it does need to be able to execute Python code.
44 "-Dpython=${python.pythonOnBuildForHost.interpreter}"
48 description = "Python 3 bindings for cairo";
49 homepage = "https://pycairo.readthedocs.io/";
50 license = with licenses; [
54 platforms = lib.platforms.linux ++ lib.platforms.darwin;