2022-03-30 09:31:56 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, python
|
|
|
|
, pkg-config
|
|
|
|
, pango
|
|
|
|
, cython
|
|
|
|
, AppKit
|
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
|
|
|
}:
|
2021-12-06 16:07:01 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "manimpango";
|
2022-03-30 09:31:56 +00:00
|
|
|
version = "0.4.1";
|
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2021-12-06 16:07:01 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ManimCommunity";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2022-03-30 09:31:56 +00:00
|
|
|
hash = "sha256-ourSUYBAFONdupdsjo/PtwRQpXS7HqLxrHj0Ejr/Wdw=";
|
2021-12-06 16:07:01 +00:00
|
|
|
};
|
|
|
|
|
2022-03-30 09:31:56 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
pkg-config
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
pango
|
|
|
|
] ++ lib.optionals stdenv.isDarwin [
|
|
|
|
AppKit
|
|
|
|
];
|
2021-12-06 16:07:01 +00:00
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
cython
|
|
|
|
];
|
|
|
|
|
2022-03-30 09:31:56 +00:00
|
|
|
checkInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.cfg \
|
|
|
|
--replace "--cov --no-cov-on-fail" ""
|
|
|
|
'';
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
preBuild = ''
|
|
|
|
${python.interpreter} setup.py build_ext --inplace
|
|
|
|
'';
|
|
|
|
|
2022-03-30 09:31:56 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"manimpango"
|
|
|
|
];
|
2021-12-06 16:07:01 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
2022-03-30 09:31:56 +00:00
|
|
|
description = "Binding for Pango";
|
2021-12-06 16:07:01 +00:00
|
|
|
homepage = "https://github.com/ManimCommunity/ManimPango";
|
2022-01-26 04:04:25 +00:00
|
|
|
license = licenses.mit;
|
2022-03-30 09:31:56 +00:00
|
|
|
maintainers = with maintainers; [ emilytrau ];
|
2021-12-06 16:07:01 +00:00
|
|
|
};
|
|
|
|
}
|