1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 pythonOlder,
6 bitarray,
7 setuptools,
8 pytest-benchmark,
9 pytestCheckHook,
10}:
11
12buildPythonPackage rec {
13 pname = "bitstring";
14 version = "4.2.3";
15 pyproject = true;
16
17 disabled = pythonOlder "3.7";
18
19 src = fetchFromGitHub {
20 owner = "scott-griffiths";
21 repo = pname;
22 rev = "refs/tags/bitstring-${version}";
23 hash = "sha256-m2LZdUWOMxzr/biZhD1nWagab8PohHTcr+U1di0nkrU=";
24 };
25
26 build-system = [ setuptools ];
27
28 dependencies = [ bitarray ];
29
30 nativeCheckInputs = [
31 pytest-benchmark
32 pytestCheckHook
33 ];
34
35 pytestFlagsArray = [
36 "--benchmark-disable"
37 ];
38
39 disabledTestPaths = [
40 "tests/test_bits.py"
41 "tests/test_fp8.py"
42 "tests/test_mxfp.py"
43 ];
44
45 pythonImportsCheck = [ "bitstring" ];
46
47 meta = with lib; {
48 description = "Module for binary data manipulation";
49 homepage = "https://github.com/scott-griffiths/bitstring";
50 license = licenses.mit;
51 platforms = platforms.unix;
52 maintainers = with maintainers; [ bjornfor ];
53 };
54}