From a104d1010cc19cdef9033e667d91da2212d0a4d0 Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Tue, 25 Mar 2025 20:09:38 +0000 Subject: [PATCH] python312Packages.ipydatagrid: init at 1.4.0 --- .../python-modules/ipydatagrid/default.nix | 72 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 74 insertions(+) create mode 100644 pkgs/development/python-modules/ipydatagrid/default.nix diff --git a/pkgs/development/python-modules/ipydatagrid/default.nix b/pkgs/development/python-modules/ipydatagrid/default.nix new file mode 100644 index 000000000000..2b4c21903783 --- /dev/null +++ b/pkgs/development/python-modules/ipydatagrid/default.nix @@ -0,0 +1,72 @@ +{ + lib, + buildPythonPackage, + fetchFromGitHub, + pytestCheckHook, + + hatchling, + hatch-jupyter-builder, + jupyterlab, + bqplot, + ipywidgets, + pandas, + py2vega, + yarn-berry_3, +}: + +let + yarn-berry = yarn-berry_3; +in + +buildPythonPackage rec { + pname = "ipydatagrid"; + version = "1.4.0"; + pyproject = true; + + src = fetchFromGitHub { + owner = "jupyter-widgets"; + repo = "ipydatagrid"; + tag = version; + hash = "sha256-6jaIYgLbNXIYzM+mZIVMZ1CXOpcbVK5k9nzGjq5UdLI="; + }; + + build-system = [ + hatchling + hatch-jupyter-builder + jupyterlab + ]; + + nativeBuildInputs = [ + yarn-berry.yarnBerryConfigHook + yarn-berry + ]; + + dependencies = [ + bqplot + ipywidgets + pandas + py2vega + ]; + + offlineCache = yarn-berry.fetchYarnBerryDeps { + inherit src; + hash = "sha256-5KZl9mK6xNvy2XdWieH20hEZJ+h/KzvjOfpo78FlWpg="; + }; + + preConfigure = '' + substituteInPlace pyproject.toml package.json \ + --replace-fail 'jlpm' 'yarn' + ''; + + nativeCheckInputs = [ + pytestCheckHook + ]; + + meta = { + description = "Fast Datagrid widget for the Jupyter Notebook and JupyterLab"; + homepage = "https://github.com/jupyter-widgets/ipydatagrid"; + changelog = "https://github.com/jupyter-widgets/ipydatagrid/releases/tag/${version}"; + license = lib.licenses.bsd3; + maintainers = with lib.maintainers; [ flokli ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 19999aa3fcad..65ae79f33aaa 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -6811,6 +6811,8 @@ self: super: with self; { ipycanvas = callPackage ../development/python-modules/ipycanvas { }; + ipydatagrid = callPackage ../development/python-modules/ipydatagrid { }; + ipydatawidgets = callPackage ../development/python-modules/ipydatawidgets { }; ipykernel = callPackage ../development/python-modules/ipykernel { };