ch9344: 2.0 -> 0-unstable-2024-11-15 (#354536)
[NixPkgs.git] / pkgs / development / python-modules / nessclient / default.nix
blobf14122123355198f3dad64b0221731a7d1f034e4
2   lib,
3   buildPythonPackage,
4   click,
5   fetchFromGitHub,
6   justbackoff,
7   pyserial-asyncio,
8   pythonOlder,
9   pytest-asyncio,
10   pytestCheckHook,
11   setuptools,
14 buildPythonPackage rec {
15   pname = "nessclient";
16   version = "1.1.2";
17   pyproject = true;
19   disabled = pythonOlder "3.8";
21   src = fetchFromGitHub {
22     owner = "nickw444";
23     repo = "nessclient";
24     rev = "refs/tags/${version}";
25     hash = "sha256-STDEIY7D02MlH+R6uLAKl6ghSQjhG1OEQWj71DrZP30=";
26   };
28   postPatch = ''
29     substituteInPlace setup.py \
30       --replace-fail "version = '0.0.0-dev'" "version = '${version}'"
31   '';
33   build-system = [ setuptools ];
35   dependencies = [
36     justbackoff
37     pyserial-asyncio
38   ];
40   optional-dependencies = {
41     cli = [ click ];
42   };
44   nativeCheckInputs = [
45     pytest-asyncio
46     pytestCheckHook
47   ];
49   pythonImportsCheck = [ "nessclient" ];
51   meta = with lib; {
52     description = "Python implementation/abstraction of the Ness D8x/D16x Serial Interface ASCII protocol";
53     homepage = "https://github.com/nickw444/nessclient";
54     changelog = "https://github.com/nickw444/nessclient/releases/tag/${version}";
55     license = licenses.mit;
56     maintainers = with maintainers; [ fab ];
57     mainProgram = "ness-cli";
58   };