parabolic: 2024.5.0 -> 2025.1.4 (#378350)
[NixPkgs.git] / pkgs / development / python-modules / pyversasense / default.nix
blobd6328c4acf813dd480dd1eeff05052218a84568f
2   lib,
3   aiohttp,
4   asynctest,
5   buildPythonPackage,
6   fetchFromGitHub,
7   pytest-asyncio,
8   pytestCheckHook,
9   pythonOlder,
12 buildPythonPackage rec {
13   pname = "pyversasense";
14   version = "0.0.6";
15   format = "setuptools";
17   disabled = pythonOlder "3.7";
19   src = fetchFromGitHub {
20     owner = "imstevenxyz";
21     repo = pname;
22     rev = "v${version}";
23     sha256 = "vTaDEwImWDMInwti0Jj+j+RFEtXOOKtiH5wOMD6ZmJk=";
24   };
26   propagatedBuildInputs = [ aiohttp ];
28   doCheck = pythonOlder "3.11"; # asynctest unsupported on python3.11
30   nativeCheckInputs = [
31     asynctest
32     pytest-asyncio
33     pytestCheckHook
34   ];
36   pytestFlagsArray = [ "tests/test.py" ];
38   disabledTests = [
39     # Tests are not properly mocking network requests
40     "test_device_mac"
41     "test_peripheral_id"
42     "test_peripheral_measurements"
43     "test_samples"
44   ];
46   pythonImportsCheck = [ "pyversasense" ];
48   meta = with lib; {
49     description = "Python library to communicate with the VersaSense API";
50     homepage = "https://github.com/imstevenxyz/pyversasense";
51     license = licenses.asl20;
52     maintainers = with maintainers; [ fab ];
53   };