2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
bitstruct,
|
|
|
|
buildPythonPackage,
|
|
|
|
diskcache,
|
|
|
|
fetchFromGitHub,
|
|
|
|
prompt-toolkit,
|
|
|
|
pyparsing,
|
|
|
|
pytest-xdist,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
|
|
|
setuptools,
|
2022-06-16 17:23:12 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "asn1tools";
|
2023-03-15 16:39:30 +00:00
|
|
|
version = "0.166.0";
|
2024-01-25 14:12:00 +00:00
|
|
|
pyproject = true;
|
2022-09-09 14:08:57 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.8";
|
2022-06-16 17:23:12 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "eerimoq";
|
|
|
|
repo = "asn1tools";
|
2024-01-25 14:12:00 +00:00
|
|
|
rev = "refs/tags/${version}";
|
2023-03-15 16:39:30 +00:00
|
|
|
hash = "sha256-TWAOML6nsLX3TYqoQ9fcSjrUmC4byXOfczfkmSaSa0k=";
|
2022-06-16 17:23:12 +00:00
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeBuildInputs = [ setuptools ];
|
2024-01-25 14:12:00 +00:00
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
bitstruct
|
|
|
|
pyparsing
|
|
|
|
];
|
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
passthru.optional-depdendencies = {
|
2024-06-05 15:53:02 +00:00
|
|
|
shell = [ prompt-toolkit ];
|
|
|
|
cache = [ diskcache ];
|
2023-11-16 04:20:00 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeCheckInputs = [
|
2024-01-25 14:12:00 +00:00
|
|
|
pytest-xdist
|
2023-11-16 04:20:00 +00:00
|
|
|
pytestCheckHook
|
|
|
|
] ++ lib.flatten (builtins.attrValues passthru.optional-depdendencies);
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "asn1tools" ];
|
2022-06-16 17:23:12 +00:00
|
|
|
|
2024-01-25 14:12:00 +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-16 17:23:12 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "ASN.1 parsing, encoding and decoding";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "asn1tools";
|
2022-06-16 17:23:12 +00:00
|
|
|
homepage = "https://github.com/eerimoq/asn1tools";
|
2024-01-25 14:12:00 +00:00
|
|
|
changelog = "https://github.com/eerimoq/asn1tools/releases/tag/${version}";
|
2022-06-16 17:23:12 +00:00
|
|
|
license = licenses.mit;
|
2023-08-04 22:07:22 +00:00
|
|
|
maintainers = with maintainers; [ ];
|
2022-06-16 17:23:12 +00:00
|
|
|
};
|
|
|
|
}
|