2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
stdenv,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
python,
|
|
|
|
pkg-config,
|
|
|
|
pango,
|
|
|
|
cython,
|
|
|
|
AppKit,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
2022-03-30 09:31:56 +00:00
|
|
|
}:
|
2021-12-06 16:07:01 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "manimpango";
|
2023-11-16 04:20:00 +00:00
|
|
|
version = "0.5.0";
|
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-11-16 04:20:00 +00:00
|
|
|
hash = "sha256-EBSbvjQyQIXOzvQMbuTwOoV8xSAOYDlCBZ56NLneuQI=";
|
2021-12-06 16:07:01 +00:00
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeBuildInputs = [ pkg-config ];
|
2022-03-30 09:31:56 +00:00
|
|
|
|
2024-09-26 11:04:55 +00:00
|
|
|
buildInputs = [ pango ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ AppKit ];
|
2021-12-06 16:07:01 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
propagatedBuildInputs = [ cython ];
|
2021-12-06 16:07:01 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
2022-03-30 09:31:56 +00:00
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.cfg \
|
|
|
|
--replace "--cov --no-cov-on-fail" ""
|
|
|
|
'';
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
preBuild = ''
|
2023-11-16 04:20:00 +00:00
|
|
|
${python.pythonOnBuildForHost.interpreter} setup.py build_ext --inplace
|
2021-12-06 16:07:01 +00:00
|
|
|
'';
|
|
|
|
|
2024-06-05 15:53:02 +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
|
|
|
};
|
|
|
|
}
|