Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 23.11 81 lines 1.5 kB view raw
1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, pythonOlder 5 6# build 7, hatchling 8 9# runtime 10, jsonschema 11, python-json-logger 12, pyyaml 13, referencing 14, traitlets 15 16# optionals 17, click 18, rich 19 20# tests 21, pytest-asyncio 22, pytest-console-scripts 23, pytestCheckHook 24}: 25 26buildPythonPackage rec { 27 pname = "jupyter-events"; 28 version = "0.9.0"; 29 pyproject = true; 30 31 disabled = pythonOlder "3.8"; 32 33 src = fetchFromGitHub { 34 owner = "jupyter"; 35 repo = "jupyter_events"; 36 rev = "refs/tags/v${version}"; 37 hash = "sha256-LDj6dTtq3npJxLKBQEEwGQFeDPvWF2adHeJhOai2MRU="; 38 }; 39 40 nativeBuildInputs = [ 41 hatchling 42 ]; 43 44 propagatedBuildInputs = [ 45 jsonschema 46 python-json-logger 47 pyyaml 48 referencing 49 traitlets 50 ] 51 ++ jsonschema.optional-dependencies.format-nongpl; 52 53 passthru.optional-dependencies = { 54 cli = [ 55 click 56 rich 57 ]; 58 }; 59 60 nativeCheckInputs = [ 61 pytest-asyncio 62 pytest-console-scripts 63 pytestCheckHook 64 ] ++ lib.flatten (builtins.attrValues passthru.optional-dependencies); 65 66 preCheck = '' 67 export PATH="$out/bin:$PATH" 68 ''; 69 70 pythonImportsCheck = [ 71 "jupyter_events" 72 ]; 73 74 meta = with lib; { 75 changelog = "https://github.com/jupyter/jupyter_events/releases/tag/v${version}"; 76 description = "Configurable event system for Jupyter applications and extensions"; 77 homepage = "https://github.com/jupyter/jupyter_events"; 78 license = licenses.bsd3; 79 maintainers = with maintainers; [ ]; 80 }; 81}