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