nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 pkg-config,
6 setuptools,
7 pango,
8 cython,
9 pytest-cov-stub,
10 pytestCheckHook,
11}:
12
13buildPythonPackage rec {
14 pname = "manimpango";
15 version = "0.6.1";
16 pyproject = true;
17
18 src = fetchFromGitHub {
19 owner = "ManimCommunity";
20 repo = "manimpango";
21 tag = "v${version}";
22 hash = "sha256-8eQmhVsW440/zxOwjngnPTGT7iFbdSvBV7tnI332piE=";
23 };
24
25 postPatch = ''
26 substituteInPlace pyproject.toml \
27 --replace-fail "Cython>=3.0.2,<3.1" Cython
28 '';
29
30 nativeBuildInputs = [ pkg-config ];
31
32 buildInputs = [ pango ];
33
34 build-system = [
35 setuptools
36 cython
37 ];
38
39 nativeCheckInputs = [
40 pytest-cov-stub
41 pytestCheckHook
42 ];
43
44 preCheck = ''
45 rm -r manimpango
46 '';
47
48 pythonImportsCheck = [ "manimpango" ];
49
50 meta = {
51 description = "Binding for Pango";
52 homepage = "https://github.com/ManimCommunity/ManimPango";
53 changelog = "https://github.com/ManimCommunity/ManimPango/releases/tag/v${version}";
54 license = lib.licenses.mit;
55 maintainers = with lib.maintainers; [ emilytrau ];
56 };
57}