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