nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenv,
4 buildPythonPackage,
5 fetchFromGitLab,
6 setuptools,
7 setuptools-scm,
8 confluent-kafka,
9 msgpack,
10 swh-core,
11 swh-model,
12 pytestCheckHook,
13 pytest-mock,
14}:
15
16buildPythonPackage (finalAttrs: {
17 pname = "swh-journal";
18 version = "2.0.0";
19 pyproject = true;
20
21 src = fetchFromGitLab {
22 domain = "gitlab.softwareheritage.org";
23 group = "swh";
24 owner = "devel";
25 repo = "swh-journal";
26 tag = "v${finalAttrs.version}";
27 hash = "sha256-ycTB7hSjTerJOd+nEv8HbM82vPAO8P1+xooy0oN4eHw=";
28 };
29
30 build-system = [
31 setuptools
32 setuptools-scm
33 ];
34
35 dependencies = [
36 confluent-kafka
37 msgpack
38 swh-core
39 swh-model
40 ];
41
42 pythonImportsCheck = [ "swh.journal" ];
43
44 nativeCheckInputs = [
45 pytestCheckHook
46 pytest-mock
47 ];
48
49 disabledTestPaths = [
50 # AssertionError: assert {'author': {'email': b'', 'fullname': b'foo', 'name': b'foo'}, 'date': {'offset_bytes': b'+0200', 'timestamp': {'micro...': 1234567890}}, 'id': b'\x80Y\xdcN\x17\xfc\xd0\xe5\x1c\xa3\xbc\xd6\xb8\x0fEw\xd2\x81\xfd\x08', 'message': b'foo', ...} is None
51 "swh/journal/tests/test_kafka_writer.py"
52 ]
53 ++ lib.optionals stdenv.hostPlatform.isDarwin [
54 #Fatal Python error: Segmentation fault"
55 "swh/journal/tests/test_client.py"
56 "swh/journal/tests/test_pytest_plugin.py"
57 ];
58
59 meta = {
60 description = "Persistent logger of changes to the archive, with publish-subscribe support";
61 homepage = "https://gitlab.softwareheritage.org/swh/devel/swh-journal";
62 license = lib.licenses.gpl3Only;
63 maintainers = with lib.maintainers; [ drupol ];
64 };
65})