diff --git a/pkgs/development/python-modules/asn1tools/default.nix b/pkgs/development/python-modules/asn1tools/default.nix index 0d1cab628056..57f797c72614 100644 --- a/pkgs/development/python-modules/asn1tools/default.nix +++ b/pkgs/development/python-modules/asn1tools/default.nix @@ -1,15 +1,23 @@ { lib, - bitstruct, buildPythonPackage, - diskcache, fetchFromGitHub, - prompt-toolkit, + + # build-system + setuptools, + + # dependencies + bitstruct, pyparsing, + + # optional-dependencies + prompt-toolkit, + diskcache, + + # tests pytest-xdist, pytestCheckHook, - pythonOlder, - setuptools, + versionCheckHook, }: buildPythonPackage rec { @@ -17,8 +25,6 @@ buildPythonPackage rec { version = "0.167.0"; pyproject = true; - disabled = pythonOlder "3.8"; - src = fetchFromGitHub { owner = "eerimoq"; repo = "asn1tools"; @@ -41,7 +47,9 @@ buildPythonPackage rec { nativeCheckInputs = [ pytest-xdist pytestCheckHook + versionCheckHook ] ++ lib.flatten (builtins.attrValues optional-dependencies); + versionCheckProgramArg = [ "--version" ]; pythonImportsCheck = [ "asn1tools" ]; @@ -49,13 +57,23 @@ buildPythonPackage rec { # assert exact error message of pyparsing which changed and no longer matches # https://github.com/eerimoq/asn1tools/issues/167 "test_parse_error" + + # IndexError: string index out of range + # https://github.com/eerimoq/asn1tools/issues/191 + "test_c_source" + "test_command_line_generate_c_source_oer" + "test_missing_parameterized_value" + "test_parse_parameterization" + # SystemExit: error: string index out of range + "test_command_line_generate_c_source_uper" + "test_command_line_generate_rust_source_uper" ]; - meta = with lib; { + meta = { description = "ASN.1 parsing, encoding and decoding"; homepage = "https://github.com/eerimoq/asn1tools"; changelog = "https://github.com/eerimoq/asn1tools/releases/tag/${version}"; - license = licenses.mit; + license = lib.licenses.mit; maintainers = [ ]; mainProgram = "asn1tools"; };