1{
2 lib,
3 fetchFromGitHub,
4 buildPythonPackage,
5 setuptools,
6 matplotlib,
7 numpy,
8 pytestCheckHook,
9 pillow,
10 nix-update-script,
11}:
12
13buildPythonPackage rec {
14 pname = "mpl-typst";
15 version = "0.1.0";
16 pyproject = true;
17
18 src = fetchFromGitHub {
19 owner = "daskol";
20 repo = "mpl-typst";
21 tag = "v${version}";
22 hash = "sha256-Pm5z4tkpgwjYtpBh9+AJWlsHl7HNGxyftfaNSwQDpdk=";
23 };
24
25 build-system = [
26 setuptools
27 ];
28
29 dependencies = [
30 matplotlib
31 ];
32
33 nativeCheckInputs = [
34 pytestCheckHook
35 pillow
36 numpy
37 ];
38
39 pythonImportsCheck = [
40 "mpl_typst"
41 "mpl_typst.as_default"
42 ];
43
44 passthru.updateScript = nix-update-script { };
45
46 meta = {
47 description = "Typst backend for matplotlib";
48 homepage = "https://github.com/daskol/mpl-typst";
49 changelog = "https://github.com/daskol/mpl-typst/releases/tag/v${version}";
50 license = lib.licenses.mit;
51 maintainers = with lib.maintainers; [ genga898 ];
52 };
53}