nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenv,
4 buildPythonPackage,
5 fetchFromGitHub,
6
7 # build-system
8 poetry-core,
9
10 # dependencies
11 blinker,
12 click,
13 crochet,
14 jsonschema,
15 pika,
16 pyopenssl,
17 requests,
18 service-identity,
19 tomli,
20 twisted,
21
22 # tests
23 pytest-mock,
24 pytest-twisted,
25 pytestCheckHook,
26}:
27
28buildPythonPackage rec {
29 pname = "fedora-messaging";
30 version = "3.9.0";
31 pyproject = true;
32
33 src = fetchFromGitHub {
34 owner = "fedora-infra";
35 repo = "fedora-messaging";
36 tag = "v${version}";
37 hash = "sha256-eQ0grcp/Cd9yKNbeUtftSmqv3uwOJCh36E6CC1Si1aY=";
38 };
39
40 build-system = [ poetry-core ];
41
42 dependencies = [
43 blinker
44 click
45 crochet
46 jsonschema
47 pika
48 pyopenssl
49 requests
50 service-identity
51 tomli
52 twisted
53 ];
54
55 pythonImportsCheck = [ "fedora_messaging" ];
56
57 nativeCheckInputs = [
58 pytest-mock
59 pytest-twisted
60 pytestCheckHook
61 ];
62
63 enabledTestPaths = [ "tests/unit" ];
64
65 disabledTests = [
66 # Broken since click was updated to 8.2.1 in https://github.com/NixOS/nixpkgs/pull/448189
67 # AssertionError
68 "test_no_conf"
69 ]
70 ++ lib.optionals stdenv.hostPlatform.isDarwin [
71 # AttributeError: module 'errno' has no attribute 'EREMOTEIO'. Did you mean: 'EREMOTE'?
72 "test_publish_rejected_message"
73 ];
74
75 __darwinAllowLocalNetworking = true;
76
77 meta = {
78 description = "Library for sending AMQP messages with JSON schema in Fedora infrastructure";
79 homepage = "https://github.com/fedora-infra/fedora-messaging";
80 changelog = "https://github.com/fedora-infra/fedora-messaging/releases/tag/${src.tag}";
81 license = lib.licenses.gpl2Plus;
82 maintainers = with lib.maintainers; [ erictapen ];
83 };
84}