2020-11-06 00:33:48 +00:00
|
|
|
{ lib
|
2021-04-26 19:14:03 +00:00
|
|
|
, pythonOlder
|
2020-11-06 00:33:48 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, meson
|
|
|
|
, ninja
|
|
|
|
, buildPythonPackage
|
|
|
|
, pytestCheckHook
|
|
|
|
, pkg-config
|
|
|
|
, cairo
|
2021-04-26 19:14:03 +00:00
|
|
|
, python
|
2020-11-06 00:33:48 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pycairo";
|
2021-06-28 23:13:55 +00:00
|
|
|
version = "1.20.1";
|
2021-04-26 19:14:03 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.6";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
format = "other";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "pygobject";
|
|
|
|
repo = "pycairo";
|
|
|
|
rev = "v${version}";
|
2021-06-28 23:13:55 +00:00
|
|
|
sha256 = "09aisph7ycgb4xi2xglvrn59i3cyqms8jbb876cl9763g7yqbcr6";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
meson
|
|
|
|
ninja
|
2020-11-06 00:33:48 +00:00
|
|
|
pkg-config
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
cairo
|
|
|
|
];
|
|
|
|
|
2020-11-06 00:33:48 +00:00
|
|
|
checkInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-11-06 00:33:48 +00:00
|
|
|
mesonFlags = [
|
2021-12-06 16:07:01 +00:00
|
|
|
# This is only used for figuring out what version of Python is in
|
|
|
|
# use, and related stuff like figuring out what the install prefix
|
|
|
|
# should be, but it does need to be able to execute Python code.
|
|
|
|
"-Dpython=${python.pythonForBuild.interpreter}"
|
2020-11-06 00:33:48 +00:00
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
2021-04-26 19:14:03 +00:00
|
|
|
description = "Python 3 bindings for cairo";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://pycairo.readthedocs.io/";
|
2020-11-06 00:33:48 +00:00
|
|
|
license = with licenses; [ lgpl21Only mpl11 ];
|
2020-04-24 23:36:52 +00:00
|
|
|
platforms = lib.platforms.linux ++ lib.platforms.darwin;
|
|
|
|
};
|
|
|
|
}
|