Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / jupyter-events / default.nix
blob98e6ea22df6e017afe1e0a6842eb5f760155998a
1 { lib
2 , buildPythonPackage
3 , fetchFromGitHub
5 # build
6 , hatchling
8 # runtime
9 , jsonschema
10 , python-json-logger
11 , pyyaml
12 , traitlets
14 # optionals
15 , click
16 , rich
18 # tests
19 , pytest-asyncio
20 , pytest-console-scripts
21 , pytestCheckHook
24 buildPythonPackage rec {
25   pname = "jupyter-events";
26   version = "0.7.0";
27   format = "pyproject";
29   src = fetchFromGitHub {
30     owner = "jupyter";
31     repo = "jupyter_events";
32     rev = "refs/tags/v${version}";
33     hash = "sha256-hOx2/WiFpDjtmP+qC6Ew2VY4/gdvXuv2k76qtmS+61M=";
34   };
36   nativeBuildInputs = [
37     hatchling
38   ];
40   propagatedBuildInputs = [
41     jsonschema
42     python-json-logger
43     pyyaml
44     traitlets
45   ]
46   ++ jsonschema.optional-dependencies.format
47   ++ jsonschema.optional-dependencies.format-nongpl;
49   passthru.optional-dependencies = {
50     cli = [
51       click
52       rich
53     ];
54   };
56   nativeCheckInputs = [
57     pytest-asyncio
58     pytest-console-scripts
59     pytestCheckHook
60   ] ++ lib.flatten (builtins.attrValues passthru.optional-dependencies);
62   preCheck = ''
63     export PATH="$out/bin:$PATH"
64   '';
66   meta = with lib; {
67     changelog = "https://github.com/jupyter/jupyter_events/releases/tag/v${version}";
68     description = "Configurable event system for Jupyter applications and extensions";
69     homepage = "https://github.com/jupyter/jupyter_events";
70     license = licenses.bsd3;
71     maintainers = with maintainers; [ ];
72   };