From 4b051a679727e16efda23b53a995b06b0d67c92d Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Tue, 14 May 2024 17:09:45 +0200 Subject: [PATCH] python312Packages.pyais: init at 2.6.5 Module for decoding and encoding AIS messages (AIVDM/AIVDO) https://github.com/M0r13n/pyais --- .../python-modules/pyais/default.nix | 49 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 51 insertions(+) create mode 100644 pkgs/development/python-modules/pyais/default.nix diff --git a/pkgs/development/python-modules/pyais/default.nix b/pkgs/development/python-modules/pyais/default.nix new file mode 100644 index 000000000000..2070b0616cb1 --- /dev/null +++ b/pkgs/development/python-modules/pyais/default.nix @@ -0,0 +1,49 @@ +{ + lib, + attrs, + bitarray, + buildPythonPackage, + fetchFromGitHub, + pytestCheckHook, + pythonOlder, + setuptools, +}: + +buildPythonPackage rec { + pname = "pyais"; + version = "2.6.5"; + pyproject = true; + + disabled = pythonOlder "3.7"; + + src = fetchFromGitHub { + owner = "M0r13n"; + repo = "pyais"; + rev = "refs/tags/v${version}"; + hash = "sha256-/I/4ATvX/0ya8xtineXyjSFJBGhDNy/tosh2NdnKLK4="; + }; + + nativeBuildInputs = [ setuptools ]; + + dependencies = [ + attrs + bitarray + ]; + + nativeCheckInputs = [ pytestCheckHook ]; + + pythonImportsCheck = [ "pyais" ]; + + disabledTestPaths = [ + # Tests the examples which have additional requirements + "tests/test_examples.py" + ]; + + meta = with lib; { + description = "Module for decoding and encoding AIS messages (AIVDM/AIVDO)"; + homepage = "https://github.com/M0r13n/pyais"; + changelog = "https://github.com/M0r13n/pyais/blob/${version}/CHANGELOG.txt"; + license = licenses.mit; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index bf453e7795da..4dcdb27ffd65 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -10599,6 +10599,8 @@ self: super: with self; { pyairvisual = callPackage ../development/python-modules/pyairvisual { }; + pyais = callPackage ../development/python-modules/pyais { }; + pyalgotrade = callPackage ../development/python-modules/pyalgotrade { }; pyamg = callPackage ../development/python-modules/pyamg { };