2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
pythonOlder,
|
2023-01-20 10:41:00 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
# build
|
|
|
|
hatchling,
|
2023-01-20 10:41:00 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
# runtime
|
|
|
|
jsonschema,
|
|
|
|
python-json-logger,
|
|
|
|
pyyaml,
|
|
|
|
referencing,
|
|
|
|
traitlets,
|
2023-01-20 10:41:00 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
# optionals
|
|
|
|
click,
|
|
|
|
rich,
|
2023-01-20 10:41:00 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
# tests
|
|
|
|
pytest-asyncio,
|
|
|
|
pytest-console-scripts,
|
|
|
|
pytestCheckHook,
|
2023-01-20 10:41:00 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "jupyter-events";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "0.10.0";
|
2024-01-02 11:29:13 +00:00
|
|
|
pyproject = true;
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.8";
|
2023-01-20 10:41:00 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "jupyter";
|
|
|
|
repo = "jupyter_events";
|
|
|
|
rev = "refs/tags/v${version}";
|
2024-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-8aps8aNgXw+XbDgtCvWw+Ij1Cm1N0G+wcL35ySkofOk=";
|
2023-01-20 10:41:00 +00:00
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeBuildInputs = [ hatchling ];
|
2023-01-20 10:41:00 +00:00
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
jsonschema
|
|
|
|
python-json-logger
|
|
|
|
pyyaml
|
2024-01-02 11:29:13 +00:00
|
|
|
referencing
|
2023-01-20 10:41:00 +00:00
|
|
|
traitlets
|
2024-06-05 15:53:02 +00:00
|
|
|
] ++ jsonschema.optional-dependencies.format-nongpl;
|
2023-01-20 10:41:00 +00:00
|
|
|
|
|
|
|
passthru.optional-dependencies = {
|
|
|
|
cli = [
|
|
|
|
click
|
|
|
|
rich
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2023-01-20 10:41:00 +00:00
|
|
|
pytest-asyncio
|
|
|
|
pytest-console-scripts
|
|
|
|
pytestCheckHook
|
|
|
|
] ++ lib.flatten (builtins.attrValues passthru.optional-dependencies);
|
|
|
|
|
|
|
|
preCheck = ''
|
|
|
|
export PATH="$out/bin:$PATH"
|
|
|
|
'';
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "jupyter_events" ];
|
2024-01-02 11:29:13 +00:00
|
|
|
|
2023-01-20 10:41:00 +00:00
|
|
|
meta = with lib; {
|
|
|
|
changelog = "https://github.com/jupyter/jupyter_events/releases/tag/v${version}";
|
|
|
|
description = "Configurable event system for Jupyter applications and extensions";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "jupyter-events";
|
2023-01-20 10:41:00 +00:00
|
|
|
homepage = "https://github.com/jupyter/jupyter_events";
|
|
|
|
license = licenses.bsd3;
|
2024-07-31 10:19:44 +00:00
|
|
|
maintainers = [ ];
|
2023-01-20 10:41:00 +00:00
|
|
|
};
|
|
|
|
}
|