1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, bitstruct
5, diskcache
6, prompt-toolkit
7, pyparsing
8, python
9, pythonOlder
10, pytestCheckHook
11}:
12
13buildPythonPackage rec {
14 pname = "asn1tools";
15 version = "0.166.0";
16 format = "setuptools";
17
18 disabled = pythonOlder "3.8";
19
20 src = fetchFromGitHub {
21 owner = "eerimoq";
22 repo = "asn1tools";
23 rev = version;
24 hash = "sha256-TWAOML6nsLX3TYqoQ9fcSjrUmC4byXOfczfkmSaSa0k=";
25 };
26
27 propagatedBuildInputs = [
28 bitstruct
29 pyparsing
30 ];
31
32 passthru.optional-depdendencies = {
33 shell = [
34 prompt-toolkit
35 ];
36 cache = [
37 diskcache
38 ];
39 };
40
41 nativeCheckInputs = [
42 pytestCheckHook
43 ] ++ lib.flatten (builtins.attrValues passthru.optional-depdendencies);
44
45
46 pythonImportsCheck = [
47 "asn1tools"
48 ];
49
50 meta = with lib; {
51 description = "ASN.1 parsing, encoding and decoding";
52 homepage = "https://github.com/eerimoq/asn1tools";
53 license = licenses.mit;
54 maintainers = with maintainers; [ ];
55 };
56}