1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 poetry-core,
6 blinker,
7 click,
8 crochet,
9 jsonschema,
10 pika,
11 pyopenssl,
12 requests,
13 service-identity,
14 tomli,
15 twisted,
16 pytest-mock,
17 pytest-twisted,
18 pytestCheckHook,
19}:
20
21buildPythonPackage rec {
22 pname = "fedora-messaging";
23 version = "3.8.0";
24 pyproject = true;
25
26 src = fetchFromGitHub {
27 owner = "fedora-infra";
28 repo = "fedora-messaging";
29 tag = "v${version}";
30 hash = "sha256-2EWeJddhD6tV5jRyr3pvWYQBfq6nq0GxeTgL6MRf/jE=";
31 };
32
33 build-system = [ poetry-core ];
34
35 dependencies = [
36 blinker
37 click
38 crochet
39 jsonschema
40 pika
41 pyopenssl
42 requests
43 service-identity
44 tomli
45 twisted
46 ];
47
48 pythonImportsCheck = [ "fedora_messaging" ];
49
50 nativeCheckInputs = [
51 pytest-mock
52 pytest-twisted
53 pytestCheckHook
54 ];
55
56 enabledTestPaths = [ "tests/unit" ];
57
58 meta = {
59 description = "Library for sending AMQP messages with JSON schema in Fedora infrastructure";
60 homepage = "https://github.com/fedora-infra/fedora-messaging";
61 changelog = "https://github.com/fedora-infra/fedora-messaging/releases/tag/${src.tag}";
62 license = lib.licenses.gpl2Plus;
63 maintainers = with lib.maintainers; [ erictapen ];
64 };
65}