blob: 370de0db428c079f0a6d6a6834b6a537f8c47428 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
|
{
lib,
buildPythonPackage,
fetchFromGitHub,
pythonOlder,
# build inputs
jupyter-client,
nbformat,
nbconvert,
setuptools,
# check inputs
unittestCheckHook,
ipykernel,
}:
let
pname = "nbexec";
version = "0.2.0";
in
buildPythonPackage {
inherit pname version;
pyproject = true;
disabled = pythonOlder "3.9";
src = fetchFromGitHub {
owner = "jsvine";
repo = "nbexec";
rev = "refs/tags/v${version}";
hash = "sha256-Vv6EHX6WlnSmzQAYlO1mHnz5t078z3RQfVfte1+X2pw=";
};
build-system = [ setuptools ];
dependencies = [
jupyter-client
nbformat
nbconvert
];
# TODO there is a warning about debugpy_stream missing
nativeCheckInputs = [
unittestCheckHook
ipykernel
];
preCheck = ''
export HOME=$(mktemp -d)
'';
unittestFlagsArray = [
"-s"
"test"
"-v"
];
pythonImportsCheck = [ "nbexec" ];
__darwinAllowLocalNetworking = true;
meta = with lib; {
description = "Dead-simple tool for executing Jupyter notebooks from the command line";
mainProgram = "nbexec";
homepage = "https://github.com/jsvine/nbexec";
changelog = "https://github.com/jsvine/nbexec/releases/tag/v${version}";
license = licenses.mit;
maintainers = with maintainers; [ happysalada ];
};
}
|