Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, pythonOlder 5 6# Runtime dependencies 7, hatchling 8, toolz 9, numpy 10, jsonschema 11, typing-extensions 12, pandas 13, jinja2 14, packaging 15 16# Build, dev and test dependencies 17, anywidget 18, ipython 19, pytestCheckHook 20, vega_datasets 21, sphinx 22}: 23 24buildPythonPackage rec { 25 pname = "altair"; 26 # current version, 5.0.1, is broken with jsonschema>=4.18 27 # we use unstable version instead of patch due to many changes 28 version = "unstable-2023-08-12"; 29 format = "pyproject"; 30 disabled = pythonOlder "3.8"; 31 32 src = fetchFromGitHub { 33 owner = "altair-viz"; 34 repo = "altair"; 35 rev = "56b3b66daae7160c8d82777d2646131afcc3dab4"; 36 hash = "sha256-uVE3Bth1D1mIhaULB4IxEtOzhQd51Pscqyfdys65F6A="; 37 }; 38 39 nativeBuildInputs = [ 40 hatchling 41 ]; 42 43 propagatedBuildInputs = [ 44 jinja2 45 jsonschema 46 numpy 47 packaging 48 pandas 49 toolz 50 ] ++ lib.optional (pythonOlder "3.11") typing-extensions; 51 52 nativeCheckInputs = [ 53 anywidget 54 ipython 55 sphinx 56 vega_datasets 57 pytestCheckHook 58 ]; 59 60 pythonImportsCheck = [ "altair" ]; 61 62 disabledTestPaths = [ 63 # Disabled because it requires internet connectivity 64 "tests/test_examples.py" 65 # TODO: Disabled because of missing altair_viewer package 66 "tests/vegalite/v5/test_api.py" 67 # avoid updating files and dependency on black 68 "tests/test_toplevel.py" 69 # require vl-convert package 70 "tests/utils/test_compiler.py" 71 ]; 72 73 meta = with lib; { 74 description = "A declarative statistical visualization library for Python."; 75 homepage = "https://altair-viz.github.io"; 76 downloadPage = "https://github.com/altair-viz/altair"; 77 license = licenses.bsd3; 78 maintainers = with maintainers; [ teh vinetos ]; 79 }; 80}