nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 50 lines 1.2 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 fetchPypi, 5 hatchling, 6 ipywidgets, 7 numpy, 8 pillow, 9}: 10 11buildPythonPackage rec { 12 pname = "ipycanvas"; 13 version = "0.14.3"; 14 pyproject = true; 15 16 src = fetchPypi { 17 inherit pname version; 18 hash = "sha256-xqU6Iu6/TWEbFouPRDQUWIPyenV1UJvZmkv8SMU4Wjk="; 19 }; 20 21 # We relax dependencies here instead of pulling in a patch because upstream 22 # has released a new version using hatch-jupyter-builder, but it is not yet 23 # trivial to upgrade to that. 24 # 25 postPatch = '' 26 substituteInPlace pyproject.toml \ 27 --replace-fail '"jupyterlab>=3,<5",' "" \ 28 ''; 29 30 build-system = [ hatchling ]; 31 32 env.HATCH_BUILD_NO_HOOKS = true; 33 34 dependencies = [ 35 ipywidgets 36 numpy 37 pillow 38 ]; 39 40 doCheck = false; # tests are in Typescript and require `npx` and `chromium` 41 pythonImportsCheck = [ "ipycanvas" ]; 42 43 meta = { 44 description = "Expose the browser's Canvas API to IPython"; 45 homepage = "https://ipycanvas.readthedocs.io"; 46 changelog = "https://github.com/jupyter-widgets-contrib/ipycanvas/releases/tag/${version}"; 47 license = lib.licenses.bsd3; 48 maintainers = with lib.maintainers; [ bcdarwin ]; 49 }; 50}