summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/tlv8/default.nix
blob: 0a42cbed16ff59d13dfc28fcad6fcf9b0a3905e7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  pytestCheckHook,
}:

buildPythonPackage rec {
  pname = "tlv8";
  version = "0.10.0";
  format = "setuptools";

  # pypi does not contain test files
  src = fetchFromGitHub {
    owner = "jlusiardi";
    repo = "tlv8_python";
    rev = "v${version}";
    sha256 = "sha256-G35xMFYasKD3LnGi9q8wBmmFvqgtg0HPdC+y82nxRWA=";
  };

  checkInputs = [ pytestCheckHook ];

  pythonImportsCheck = [ "tlv8" ];

  meta = {
    description = "Type-Length-Value8 (TLV8) for Python";
    longDescription = ''
      Python module to handle type-length-value (TLV) encoded data 8-bit type, 8-bit length, and N-byte
      value as described within the Apple HomeKit Accessory Protocol Specification Non-Commercial Version
      Release R2.
    '';
    homepage = "https://github.com/jlusiardi/tlv8_python";
    license = lib.licenses.asl20;
    maintainers = with lib.maintainers; [ jojosch ];
  };
}