1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5 pythonOlder,
6
7 # build-system
8 hatchling,
9
10 # dependencies
11 click,
12 docutils,
13 itsdangerous,
14 jedi,
15 markdown,
16 narwhals,
17 packaging,
18 psutil,
19 pycrdt,
20 pygments,
21 pymdown-extensions,
22 pyyaml,
23 ruff,
24 starlette,
25 tomlkit,
26 typing-extensions,
27 uvicorn,
28 websockets,
29
30 # tests
31 versionCheckHook,
32}:
33
34buildPythonPackage rec {
35 pname = "marimo";
36 version = "0.13.6";
37 pyproject = true;
38
39 # The github archive does not include the static assets
40 src = fetchPypi {
41 inherit pname version;
42 hash = "sha256-Qsz0SJvWOJ/MH9eIMyBODCBCGC7vp2lzPsq+32tRKU8=";
43 };
44
45 build-system = [ hatchling ];
46
47 pythonRelaxDeps = [
48 "pycrdt"
49 "websockets"
50 ];
51
52 dependencies = [
53 click
54 docutils
55 itsdangerous
56 jedi
57 markdown
58 narwhals
59 packaging
60 psutil
61 pycrdt
62 pygments
63 pymdown-extensions
64 pyyaml
65 ruff
66 starlette
67 tomlkit
68 uvicorn
69 websockets
70 ] ++ lib.optionals (pythonOlder "3.11") [ typing-extensions ];
71
72 pythonImportsCheck = [ "marimo" ];
73
74 # The pypi archive does not contain tests so we do not use `pytestCheckHook`
75 nativeCheckInputs = [
76 versionCheckHook
77 ];
78 versionCheckProgramArg = "--version";
79
80 meta = {
81 description = "Reactive Python notebook that's reproducible, git-friendly, and deployable as scripts or apps";
82 homepage = "https://github.com/marimo-team/marimo";
83 changelog = "https://github.com/marimo-team/marimo/releases/tag/${version}";
84 license = lib.licenses.asl20;
85 mainProgram = "marimo";
86 maintainers = with lib.maintainers; [
87 akshayka
88 dmadisetti
89 ];
90 };
91}