Files
nixpkgs/pkgs/development/python-modules/ipycanvas/default.nix
T
Robert Schütz 1a04744f74 treewide: remove superfluous disabled
There is no need to disable Python packages for Python versions that are
no longer in Nixpkgs.
This change was generated using the following script:

    pattern='^\s*disabled\s*=\s*pythonOlder\s*"3\.\([0-9]\|10\)"\s*;\s*$'
    for f in $(find -name '*.nix'); do
        grep -q "$pattern" "$f" || continue
        sed -i "/$pattern/d" "$f"
        if [ $(grep -c pythonOlder "$f") == 1 ]; then
            sed -i '/^\s*pythonOlder,\s*$/d' "$f"
        fi
        nixfmt "$f"
    done
2026-01-11 09:34:20 -08:00

51 lines
1.1 KiB
Nix

{
lib,
buildPythonPackage,
fetchPypi,
hatchling,
ipywidgets,
numpy,
pillow,
}:
buildPythonPackage rec {
pname = "ipycanvas";
version = "0.14.2";
pyproject = true;
src = fetchPypi {
inherit pname version;
hash = "sha256-OFNwRHcRlN2jFjbEEHh4RxZyp6y1hLfotRgrIpsXBtU=";
};
# We relax dependencies here instead of pulling in a patch because upstream
# has released a new version using hatch-jupyter-builder, but it is not yet
# trivial to upgrade to that.
#
postPatch = ''
substituteInPlace pyproject.toml \
--replace-fail '"jupyterlab>=3,<5",' "" \
'';
build-system = [ hatchling ];
env.HATCH_BUILD_NO_HOOKS = true;
dependencies = [
ipywidgets
numpy
pillow
];
doCheck = false; # tests are in Typescript and require `npx` and `chromium`
pythonImportsCheck = [ "ipycanvas" ];
meta = {
description = "Expose the browser's Canvas API to IPython";
homepage = "https://ipycanvas.readthedocs.io";
changelog = "https://github.com/jupyter-widgets-contrib/ipycanvas/releases/tag/${version}";
license = lib.licenses.bsd3;
maintainers = with lib.maintainers; [ bcdarwin ];
};
}