nixpkgs/pkgs/development/python-modules/flow-record/default.nix
Martin Weinelt 5680f319fd
python311Packages.pytest7CheckHook: init
and migrate existing overrides.
2024-03-26 01:37:25 +01:00

78 lines
1.4 KiB
Nix

{ lib
, buildPythonPackage
, elasticsearch
, fastavro
, fetchFromGitHub
, lz4
, msgpack
, pytest7CheckHook
, pythonOlder
, setuptools
, setuptools-scm
, wheel
, zstandard
}:
buildPythonPackage rec {
pname = "flow-record";
version = "3.14";
pyproject = true;
disabled = pythonOlder "3.8";
src = fetchFromGitHub {
owner = "fox-it";
repo = "flow.record";
rev = "refs/tags/${version}";
hash = "sha256-8XQeXfrgTk+jHR1ABlEEIn3E/MkUkGnvkgzePws4qhQ=";
};
nativeBuildInputs = [
setuptools
setuptools-scm
wheel
];
propagatedBuildInputs = [
msgpack
];
passthru.optional-dependencies = {
compression = [
lz4
zstandard
];
elastic = [
elasticsearch
];
avro = [
fastavro
] ++ fastavro.optional-dependencies.snappy;
};
nativeCheckInputs = [
pytest7CheckHook
] ++ lib.flatten (builtins.attrValues passthru.optional-dependencies);
pythonImportsCheck = [
"flow.record"
];
disabledTestPaths = [
# Test requires rdump
"tests/test_rdump.py"
];
disabledTests = [
"test_rdump_fieldtype_path_json"
];
meta = with lib; {
description = "Library for defining and creating structured data";
homepage = "https://github.com/fox-it/flow.record";
changelog = "https://github.com/fox-it/flow.record/releases/tag/${version}";
license = licenses.agpl3Only;
maintainers = with maintainers; [ fab ];
};
}