2020-10-25 22:17:24 +01:00
|
|
|
{ lib
|
2021-04-11 21:23:42 +02:00
|
|
|
, pythonOlder
|
2020-10-25 22:17:24 +01:00
|
|
|
, fetchFromGitHub
|
|
|
|
, meson
|
|
|
|
, ninja
|
|
|
|
, buildPythonPackage
|
|
|
|
, pytestCheckHook
|
|
|
|
, pkg-config
|
|
|
|
, cairo
|
2021-04-11 21:23:42 +02:00
|
|
|
, python
|
2020-10-25 22:17:24 +01:00
|
|
|
}:
|
2007-05-13 20:49:13 +00:00
|
|
|
|
2017-11-25 16:41:57 +01:00
|
|
|
buildPythonPackage rec {
|
2017-05-27 11:25:35 +02:00
|
|
|
pname = "pycairo";
|
2021-06-18 18:39:11 -07:00
|
|
|
version = "1.20.1";
|
2017-04-01 09:50:06 +07:00
|
|
|
|
2021-04-11 21:23:42 +02:00
|
|
|
disabled = pythonOlder "3.6";
|
|
|
|
|
2019-01-10 21:43:01 -05:00
|
|
|
format = "other";
|
|
|
|
|
2017-11-25 16:41:57 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "pygobject";
|
|
|
|
repo = "pycairo";
|
|
|
|
rev = "v${version}";
|
2021-06-18 18:39:11 -07:00
|
|
|
sha256 = "09aisph7ycgb4xi2xglvrn59i3cyqms8jbb876cl9763g7yqbcr6";
|
2017-11-25 16:41:57 +01:00
|
|
|
};
|
|
|
|
|
2019-01-10 21:43:01 -05:00
|
|
|
nativeBuildInputs = [
|
|
|
|
meson
|
|
|
|
ninja
|
2020-10-25 22:17:24 +01:00
|
|
|
pkg-config
|
2019-01-10 21:43:01 -05:00
|
|
|
];
|
2018-04-07 01:53:34 +02:00
|
|
|
|
2019-01-10 21:43:01 -05:00
|
|
|
buildInputs = [
|
|
|
|
cairo
|
|
|
|
];
|
2016-04-26 23:28:39 +02:00
|
|
|
|
2020-10-25 22:17:24 +01:00
|
|
|
checkInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
2015-11-08 08:21:58 +01:00
|
|
|
|
2020-10-25 22:17:24 +01:00
|
|
|
mesonFlags = [
|
2021-11-12 11:57:10 +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-10-25 22:17:24 +01:00
|
|
|
];
|
2019-01-10 21:43:01 -05:00
|
|
|
|
|
|
|
meta = with lib; {
|
2021-04-11 21:23:42 +02:00
|
|
|
description = "Python 3 bindings for cairo";
|
2020-03-31 21:11:51 -04:00
|
|
|
homepage = "https://pycairo.readthedocs.io/";
|
2020-10-25 22:17:24 +01:00
|
|
|
license = with licenses; [ lgpl21Only mpl11 ];
|
2019-01-10 21:43:01 -05:00
|
|
|
platforms = lib.platforms.linux ++ lib.platforms.darwin;
|
|
|
|
};
|
2007-05-13 20:49:13 +00:00
|
|
|
}
|