1{
2 lib,
3 buildPythonPackage,
4 pythonOlder,
5 fetchFromGitHub,
6 poetry-core,
7 setuptools,
8 wheel,
9 ipykernel,
10 nbclient,
11 nbformat,
12 pygments,
13 pytest,
14 pyyaml,
15 pytest-xdist,
16 pytestCheckHook,
17 typing-extensions,
18}:
19
20buildPythonPackage rec {
21 pname = "nbmake";
22 version = "1.5.4";
23 pyproject = true;
24
25 disabled = pythonOlder "3.8";
26
27 src = fetchFromGitHub {
28 owner = "treebeardtech";
29 repo = "nbmake";
30 rev = "refs/tags/v${version}";
31 hash = "sha256-OzjqpipFb5COhqc//Sg6OU65ShPrYe/KtxifToEXveg=";
32 };
33
34 build-system = [
35 poetry-core
36 setuptools
37 wheel
38 ];
39
40 dependencies = [
41 ipykernel
42 nbclient
43 nbformat
44 pygments
45 pytest
46 pyyaml
47 ];
48
49 pythonRelaxDeps = [ "nbclient" ];
50
51 pythonImportsCheck = [ "nbmake" ];
52
53 nativeCheckInputs = [
54 pytest-xdist
55 pytestCheckHook
56 typing-extensions
57 ];
58
59 __darwinAllowLocalNetworking = true;
60
61 meta = {
62 description = "Pytest plugin for testing notebooks";
63 homepage = "https://github.com/treebeardtech/nbmake";
64 changelog = "https://github.com/treebeardtech/nbmake/releases/tag/v${version}";
65 license = lib.licenses.asl20;
66 maintainers = with lib.maintainers; [ GaetanLepage ];
67 };
68}