42 lines
898 B
Nix

{
lib,
buildPythonPackage,
pythonOlder,
fetchFromGitHub,
pytestCheckHook,
setuptools,
}:
buildPythonPackage rec {
pname = "asn1";
version = "3.1.0";
pyproject = true;
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "andrivet";
repo = "python-asn1";
tag = "v${version}";
hash = "sha256-yDX2TydMtqIE4A4QUmKPJKLM1UdXxp0qFBJx08Ri2YQ=";
};
build-system = [ setuptools ];
pythonRemoveDeps = [ "enum-compat" ];
nativeCheckInputs = [ pytestCheckHook ];
enabledTestPaths = [ "tests/test_asn1.py" ];
pythonImportsCheck = [ "asn1" ];
meta = with lib; {
description = "Python ASN.1 encoder and decoder";
homepage = "https://github.com/andrivet/python-asn1";
changelog = "https://github.com/andrivet/python-asn1/blob/${src.tag}/CHANGELOG.rst";
license = licenses.mit;
maintainers = with maintainers; [ fab ];
};
}