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";
|
2023-10-19 13:55:26 +00:00
|
|
|
version = "0.4.4";
|
2022-03-30 09:31:56 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2021-12-06 16:07:01 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ManimCommunity";
|
|
|
|
repo = pname;
|
2022-11-21 17:40:18 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2023-10-19 13:55:26 +00:00
|
|
|
hash = "sha256-M7Wd4s9q+oNioi4JlcQcKSyLRliGgoMzkiXcIznpR5o=";
|
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
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-03-30 09:31:56 +00:00
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.cfg \
|
|
|
|
--replace "--cov --no-cov-on-fail" ""
|
|
|
|
'';
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
preBuild = ''
|
2023-03-04 12:14:45 +00:00
|
|
|
${python.pythonForBuild.interpreter} setup.py build_ext --inplace
|
2021-12-06 16:07:01 +00:00
|
|
|
'';
|
|
|
|
|
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-11-21 17:40:18 +00:00
|
|
|
changelog = "https://github.com/ManimCommunity/ManimPango/releases/tag/v${version}";
|
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
|
|
|
};
|
|
|
|
}
|