1{
2 lib,
3 attrs,
4 bitarray,
5 buildPythonPackage,
6 fetchFromGitHub,
7 pytestCheckHook,
8 pythonOlder,
9 setuptools,
10}:
11
12buildPythonPackage rec {
13 pname = "pyais";
14 version = "2.7.0";
15 pyproject = true;
16
17 disabled = pythonOlder "3.8";
18
19 src = fetchFromGitHub {
20 owner = "M0r13n";
21 repo = "pyais";
22 rev = "refs/tags/v${version}";
23 hash = "sha256-6Bv0YE2zQv0mdXNzHkhq4sOJ18nmyxO884Smzwn2c8I=";
24 };
25
26 build-system = [ setuptools ];
27
28 dependencies = [
29 attrs
30 bitarray
31 ];
32
33 nativeCheckInputs = [ pytestCheckHook ];
34
35 pythonImportsCheck = [ "pyais" ];
36
37 disabledTestPaths = [
38 # Tests the examples which have additional requirements
39 "tests/test_examples.py"
40 ];
41
42 meta = with lib; {
43 description = "Module for decoding and encoding AIS messages (AIVDM/AIVDO)";
44 homepage = "https://github.com/M0r13n/pyais";
45 changelog = "https://github.com/M0r13n/pyais/blob/${version}/CHANGELOG.txt";
46 license = licenses.mit;
47 maintainers = with maintainers; [ fab ];
48 };
49}