1{ lib 2, buildPythonPackage 3, fetchPypi 4, pythonOlder 5, hatchling 6, hatch-jupyter-builder 7, ipywidgets 8, jupyter-ui-poll 9, pytestCheckHook 10}: 11 12buildPythonPackage rec { 13 pname = "ipyniivue"; 14 version = "1.1.0"; 15 format = "pyproject"; 16 17 disabled = pythonOlder "3.7"; 18 19 src = fetchPypi { 20 inherit pname version; 21 hash = "sha256-kym7949VI6C+62p3IOQ2QIzWnuSBcrmySb83oqUwhjI="; 22 }; 23 24 # We do not need the jupyterlab build dependency, because we do not need to 25 # build any JS components; these are present already in the PyPI artifact. 26 # 27 postPatch = '' 28 substituteInPlace pyproject.toml \ 29 --replace '"jupyterlab==3.*",' "" 30 ''; 31 32 nativeBuildInputs = [ 33 hatchling 34 hatch-jupyter-builder 35 ]; 36 37 propagatedBuildInputs = [ ipywidgets jupyter-ui-poll ]; 38 39 nativeCheckImports = [ pytestCheckHook ]; 40 pythonImportsCheck = [ "ipyniivue" ]; 41 42 meta = with lib; { 43 description = "Show a nifti image in a webgl 2.0 canvas within a jupyter notebook cell"; 44 homepage = "https://github.com/niivue/ipyniivue"; 45 changelog = "https://github.com/niivue/ipyniivue/releases/tag/${version}"; 46 license = licenses.bsd3; 47 maintainers = with maintainers; [ bcdarwin ]; 48 }; 49}