nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 fetchFromGitLab,
4 buildPythonPackage,
5 pythonAtLeast,
6
7 # build-system
8 setuptools,
9 setuptools-scm,
10
11 # dependencies
12 lz4,
13 numpy,
14 ruamel-yaml,
15 safelz4,
16 typing-extensions,
17 zstandard,
18
19 # nativeCheckInputs
20 pytestCheckHook,
21
22 # checkInputs
23 declinate,
24}:
25
26buildPythonPackage rec {
27 pname = "rosbags";
28 version = "0.11.0";
29 pyproject = true;
30
31 src = fetchFromGitLab {
32 owner = "ternaris";
33 repo = "rosbags";
34 tag = "v${version}";
35 hash = "sha256-CSRJIGLhQwuaGatfWIbnYNdjUva+klBYPyDbjHfUNlM=";
36 };
37
38 build-system = [
39 setuptools
40 setuptools-scm
41 ];
42
43 dependencies = [
44 lz4
45 numpy
46 ruamel-yaml
47 typing-extensions
48 zstandard
49 ]
50 ++ lib.optional (pythonAtLeast "3.14") safelz4;
51
52 nativeCheckInputs = [ pytestCheckHook ];
53
54 checkInputs = [
55 declinate
56 ];
57
58 pythonImportsCheck = [
59 "rosbags"
60 ];
61
62 meta = {
63 description = "Pure Python library to read, modify, convert, and write rosbag files";
64 homepage = "https://gitlab.com/ternaris/rosbags";
65 changelog = "https://gitlab.com/ternaris/rosbags/-/blob/${src.tag}/CHANGES.rst";
66 license = lib.licenses.asl20;
67 maintainers = with lib.maintainers; [ nim65s ];
68 };
69}