at master 1.4 kB view raw
1{ 2 buildPythonPackage, 3 fetchFromGitHub, 4 hatchling, 5 ipykernel, 6 ipywidgets, 7 jupyter-client, 8 jupyter-core, 9 lib, 10 nbconvert, 11 nbformat, 12 pytest-asyncio, 13 pytestCheckHook, 14 pythonOlder, 15 testpath, 16 traitlets, 17 xmltodict, 18}: 19 20let 21 nbclient = buildPythonPackage rec { 22 pname = "nbclient"; 23 version = "0.10.2"; 24 pyproject = true; 25 26 disabled = pythonOlder "3.9"; 27 28 src = fetchFromGitHub { 29 owner = "jupyter"; 30 repo = "nbclient"; 31 tag = "v${version}"; 32 hash = "sha256-+qSed6yy4YVZ25GigNTap+kMaoDiMYSJO85wurbzeDs="; 33 }; 34 35 build-system = [ hatchling ]; 36 37 dependencies = [ 38 jupyter-client 39 jupyter-core 40 nbformat 41 traitlets 42 ]; 43 44 # circular dependencies if enabled by default 45 doCheck = false; 46 47 nativeCheckInputs = [ 48 ipykernel 49 ipywidgets 50 nbconvert 51 pytest-asyncio 52 pytestCheckHook 53 testpath 54 xmltodict 55 ]; 56 57 preCheck = '' 58 export HOME=$(mktemp -d) 59 ''; 60 61 passthru.tests = { 62 check = nbclient.overridePythonAttrs (_: { 63 doCheck = true; 64 }); 65 }; 66 67 meta = { 68 homepage = "https://github.com/jupyter/nbclient"; 69 description = "Client library for executing notebooks"; 70 mainProgram = "jupyter-execute"; 71 license = lib.licenses.bsd3; 72 maintainers = [ ]; 73 }; 74 }; 75in 76nbclient