From 0fd3f2326368b2f5e40ad1203bf929db011c59ee Mon Sep 17 00:00:00 2001 From: Ben Darwin Date: Mon, 1 May 2023 15:18:15 -0400 Subject: [PATCH] python310Packages.ipyniivue: init at 1.0.2 --- .../python-modules/ipyniivue/default.nix | 38 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 40 insertions(+) create mode 100644 pkgs/development/python-modules/ipyniivue/default.nix diff --git a/pkgs/development/python-modules/ipyniivue/default.nix b/pkgs/development/python-modules/ipyniivue/default.nix new file mode 100644 index 000000000000..da55df0ac3ee --- /dev/null +++ b/pkgs/development/python-modules/ipyniivue/default.nix @@ -0,0 +1,38 @@ +{ lib +, buildPythonPackage +, fetchPypi +, pythonOlder +, hatchling +, hatch-jupyter-builder +, ipywidgets +, jupyter-ui-poll +, pytestCheckHook +}: + +buildPythonPackage rec { + pname = "ipyniivue"; + version = "1.0.2"; + format = "pyproject"; + + disabled = pythonOlder "3.7"; + + src = fetchPypi { + inherit pname version; + hash = "sha256-vFbEV/ZMXvKZeQUR536OZQ/5uIkt4tOWcCGRPMdc34I"; + }; + + nativeBuildInputs = [ hatchling hatch-jupyter-builder ]; + + propagatedBuildInputs = [ ipywidgets jupyter-ui-poll ]; + + nativeCheckImports = [ pytestCheckHook ]; + pythonImportsCheck = [ "ipyniivue" ]; + + meta = with lib; { + description = "Show a nifti image in a webgl 2.0 canvas within a jupyter notebook cell"; + homepage = "https://github.com/niivue/ipyniivue"; + changelog = "https://github.com/niivue/ipyniivue/releases/tag/${version}"; + license = licenses.bsd3; + maintainers = with maintainers; [ bcdarwin ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 02fe9ecd77c3..da079a68e538 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -4883,6 +4883,8 @@ self: super: with self; { ipydatawidgets = callPackage ../development/python-modules/ipydatawidgets { }; + ipyniivue = callPackage ../development/python-modules/ipyniivue { }; + ipykernel = callPackage ../development/python-modules/ipykernel { }; ipympl = callPackage ../development/python-modules/ipympl { };