1{ lib
2, buildPythonPackage
3, elasticsearch
4, fetchFromGitHub
5, lz4
6, msgpack
7, pytestCheckHook
8, pythonOlder
9, setuptools
10, setuptools-scm
11, wheel
12, zstandard
13}:
14
15buildPythonPackage rec {
16 pname = "flow-record";
17 version = "3.9";
18 format = "pyproject";
19
20 disabled = pythonOlder "3.9";
21
22 src = fetchFromGitHub {
23 owner = "fox-it";
24 repo = "flow.record";
25 rev = "refs/tags/${version}";
26 hash = "sha256-hvd5I1n3lOuP9sUtVO69yGCVOVEWYKKfFf7OjAJCXIg=";
27 };
28
29 SETUPTOOLS_SCM_PRETEND_VERSION = version;
30
31 nativeBuildInputs = [
32 setuptools
33 setuptools-scm
34 wheel
35 ];
36
37 propagatedBuildInputs = [
38 msgpack
39 ];
40
41 passthru.optional-dependencies = {
42 compression = [
43 lz4
44 zstandard
45 ];
46 elastic = [
47 elasticsearch
48 ];
49 };
50
51 nativeCheckInputs = [
52 pytestCheckHook
53 ];
54
55 pythonImportsCheck = [
56 "flow.record"
57 ];
58
59 disabledTestPaths = [
60 # Test requires rdump
61 "tests/test_rdump.py"
62 ];
63
64
65 disabledTests = [
66 "test_rdump_fieldtype_path_json"
67 ];
68
69 meta = with lib; {
70 description = "Library for defining and creating structured data";
71 homepage = "https://github.com/fox-it/flow.record";
72 changelog = "https://github.com/fox-it/flow.record/releases/tag/${version}";
73 license = licenses.agpl3Only;
74 maintainers = with maintainers; [ fab ];
75 };
76}