2021-08-24 15:02:01 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, pythonOlder
|
|
|
|
, fetchFromGitHub
|
|
|
|
, future
|
|
|
|
, pytestCheckHook
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "asn1";
|
2022-03-04 07:08:06 +00:00
|
|
|
version = "2.5.0";
|
2021-08-24 15:02:01 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "andrivet";
|
|
|
|
repo = "python-asn1";
|
|
|
|
rev = "v${version}";
|
2022-03-04 07:08:06 +00:00
|
|
|
sha256 = "sha256-5Fnk94aUkV9lHnd64wuHzGcPqW7AC0O0dEwXMBL+tuo=";
|
2021-08-24 15:02:01 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
future
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace "enum-compat" ""
|
|
|
|
'';
|
|
|
|
|
|
|
|
pytestFlagsArray = [ "tests/test_asn1.py" ];
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "asn1" ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python ASN.1 encoder and decoder";
|
|
|
|
homepage = "https://github.com/andrivet/python-asn1";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|