Merge pull request #307098 from r-ryantm/auto-update/cilium-cli
[NixPkgs.git] / pkgs / development / python-modules / asn1tools / default.nix
blobb339739afcab4e4cd4350bca367ece08233afcd8
1 { lib
2 , bitstruct
3 , buildPythonPackage
4 , diskcache
5 , fetchFromGitHub
6 , prompt-toolkit
7 , pyparsing
8 , pytest-xdist
9 , pytestCheckHook
10 , pythonOlder
11 , setuptools
14 buildPythonPackage rec {
15   pname = "asn1tools";
16   version = "0.166.0";
17   pyproject = true;
19   disabled = pythonOlder "3.8";
21   src = fetchFromGitHub {
22     owner = "eerimoq";
23     repo = "asn1tools";
24     rev = "refs/tags/${version}";
25     hash = "sha256-TWAOML6nsLX3TYqoQ9fcSjrUmC4byXOfczfkmSaSa0k=";
26   };
28   nativeBuildInputs = [
29     setuptools
30   ];
32   propagatedBuildInputs = [
33     bitstruct
34     pyparsing
35   ];
37   passthru.optional-depdendencies = {
38     shell = [
39       prompt-toolkit
40     ];
41     cache = [
42       diskcache
43     ];
44   };
46   nativeCheckInputs = [
47     pytest-xdist
48     pytestCheckHook
49   ] ++ lib.flatten (builtins.attrValues passthru.optional-depdendencies);
51   pythonImportsCheck = [
52     "asn1tools"
53   ];
55   disabledTests = [
56     # assert exact error message of pyparsing which changed and no longer matches
57     # https://github.com/eerimoq/asn1tools/issues/167
58     "test_parse_error"
59   ];
61   meta = with lib; {
62     description = "ASN.1 parsing, encoding and decoding";
63     mainProgram = "asn1tools";
64     homepage = "https://github.com/eerimoq/asn1tools";
65     changelog = "https://github.com/eerimoq/asn1tools/releases/tag/${version}";
66     license = licenses.mit;
67     maintainers = with maintainers; [ ];
68   };