2022-06-04 02:46:44 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
bitstruct,
|
2024-01-16 13:16:16 +00:00
|
|
|
buildPythonPackage,
|
2022-06-04 02:46:44 +00:00
|
|
|
diskcache,
|
2024-01-16 13:16:16 +00:00
|
|
|
fetchFromGitHub,
|
2022-06-04 02:46:44 +00:00
|
|
|
prompt-toolkit,
|
|
|
|
pyparsing,
|
2024-01-16 10:58:08 +00:00
|
|
|
pytest-xdist,
|
2023-09-18 16:51:31 +00:00
|
|
|
pytestCheckHook,
|
2024-01-16 13:16:16 +00:00
|
|
|
pythonOlder,
|
|
|
|
setuptools,
|
2022-06-04 02:46:44 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "asn1tools";
|
2024-10-11 15:54:01 +00:00
|
|
|
version = "0.167.0";
|
2024-01-16 13:16:16 +00:00
|
|
|
pyproject = true;
|
2022-08-27 09:05:26 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.8";
|
2022-06-04 02:46:44 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "eerimoq";
|
|
|
|
repo = "asn1tools";
|
2024-01-16 13:16:16 +00:00
|
|
|
rev = "refs/tags/${version}";
|
2024-10-11 15:54:01 +00:00
|
|
|
hash = "sha256-86bdBYlAVJfd3EY8s0t6ZDRA/qZVWuHD4Jxa1n1Ke5E=";
|
2022-06-04 02:46:44 +00:00
|
|
|
};
|
|
|
|
|
2024-10-11 15:57:01 +00:00
|
|
|
build-system = [ setuptools ];
|
2024-01-16 13:16:16 +00:00
|
|
|
|
2024-10-11 15:57:01 +00:00
|
|
|
dependencies = [
|
2022-06-04 02:46:44 +00:00
|
|
|
bitstruct
|
|
|
|
pyparsing
|
|
|
|
];
|
|
|
|
|
2024-10-11 15:57:01 +00:00
|
|
|
optional-dependencies = {
|
2023-09-18 16:51:31 +00:00
|
|
|
shell = [ prompt-toolkit ];
|
|
|
|
cache = [ diskcache ];
|
|
|
|
};
|
|
|
|
|
|
|
|
nativeCheckInputs = [
|
2024-01-16 10:58:08 +00:00
|
|
|
pytest-xdist
|
2023-09-18 16:51:31 +00:00
|
|
|
pytestCheckHook
|
2024-10-11 15:57:01 +00:00
|
|
|
] ++ lib.flatten (builtins.attrValues optional-dependencies);
|
2023-09-18 16:51:31 +00:00
|
|
|
|
2022-08-27 09:05:26 +00:00
|
|
|
pythonImportsCheck = [ "asn1tools" ];
|
2022-06-04 02:46:44 +00:00
|
|
|
|
2024-01-16 13:16:16 +00:00
|
|
|
disabledTests = [
|
|
|
|
# assert exact error message of pyparsing which changed and no longer matches
|
|
|
|
# https://github.com/eerimoq/asn1tools/issues/167
|
|
|
|
"test_parse_error"
|
|
|
|
];
|
|
|
|
|
2022-06-04 02:46:44 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "ASN.1 parsing, encoding and decoding";
|
|
|
|
homepage = "https://github.com/eerimoq/asn1tools";
|
2024-01-16 13:16:16 +00:00
|
|
|
changelog = "https://github.com/eerimoq/asn1tools/releases/tag/${version}";
|
2022-06-04 02:46:44 +00:00
|
|
|
license = licenses.mit;
|
2024-07-28 14:44:11 +00:00
|
|
|
maintainers = [ ];
|
2024-10-11 15:57:01 +00:00
|
|
|
mainProgram = "asn1tools";
|
2022-06-04 02:46:44 +00:00
|
|
|
};
|
|
|
|
}
|