From b16610365ec743c57716aa115b876417f61dfb0f Mon Sep 17 00:00:00 2001 From: natsukium Date: Mon, 14 Aug 2023 17:05:58 +0900 Subject: [PATCH] python310Packages.anywidget: init at 0.6.3 --- .../python-modules/anywidget/default.nix | 54 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 56 insertions(+) create mode 100644 pkgs/development/python-modules/anywidget/default.nix diff --git a/pkgs/development/python-modules/anywidget/default.nix b/pkgs/development/python-modules/anywidget/default.nix new file mode 100644 index 000000000000..d993af0654f8 --- /dev/null +++ b/pkgs/development/python-modules/anywidget/default.nix @@ -0,0 +1,54 @@ +{ lib +, buildPythonPackage +, fetchPypi +, pytestCheckHook +, pythonOlder +, hatch-jupyter-builder +, hatchling +, importlib-metadata +, ipywidgets +, jupyterlab +, psygnal +, typing-extensions +, watchfiles +}: + +buildPythonPackage rec { + pname = "anywidget"; + version = "0.6.3"; + format = "pyproject"; + + disabled = pythonOlder "3.7"; + + src = fetchPypi { + inherit pname version; + hash = "sha256-OUKxmYceEKURJeQTVI7oLT4SdZM90V7BoZf0UykkEV4="; + }; + + nativeBuildInputs = [ + hatch-jupyter-builder + hatchling + jupyterlab + ]; + + propagatedBuildInputs = [ + ipywidgets + psygnal + typing-extensions + ] ++ lib.optional (pythonOlder "3.8") importlib-metadata; + + nativeCheckInputs = [ + pytestCheckHook + watchfiles + ]; + + pythonImportsCheck = [ "anywidget" ]; + + meta = with lib; { + description = "Custom jupyter widgets made easy"; + homepage = "https://github.com/manzt/anywidget"; + changelog = "https://github.com/manzt/anywidget/releases/tag/anywidget%40${version}"; + license = licenses.mit; + maintainers = with maintainers; [ natsukium ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 3d8116d33a7b..870e3ef3bda8 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -548,6 +548,8 @@ self: super: with self; { inherit (pkgs) graphviz; }; + anywidget = callPackage ../development/python-modules/anywidget { }; + aocd = callPackage ../development/python-modules/aocd { }; apache-beam = callPackage ../development/python-modules/apache-beam { };