Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 bitstruct, 4 buildPythonPackage, 5 diskcache, 6 fetchFromGitHub, 7 prompt-toolkit, 8 pyparsing, 9 pytest-xdist, 10 pytestCheckHook, 11 pythonOlder, 12 setuptools, 13}: 14 15buildPythonPackage rec { 16 pname = "asn1tools"; 17 version = "0.166.0"; 18 pyproject = true; 19 20 disabled = pythonOlder "3.8"; 21 22 src = fetchFromGitHub { 23 owner = "eerimoq"; 24 repo = "asn1tools"; 25 rev = "refs/tags/${version}"; 26 hash = "sha256-TWAOML6nsLX3TYqoQ9fcSjrUmC4byXOfczfkmSaSa0k="; 27 }; 28 29 nativeBuildInputs = [ setuptools ]; 30 31 propagatedBuildInputs = [ 32 bitstruct 33 pyparsing 34 ]; 35 36 passthru.optional-depdendencies = { 37 shell = [ prompt-toolkit ]; 38 cache = [ diskcache ]; 39 }; 40 41 nativeCheckInputs = [ 42 pytest-xdist 43 pytestCheckHook 44 ] ++ lib.flatten (builtins.attrValues passthru.optional-depdendencies); 45 46 pythonImportsCheck = [ "asn1tools" ]; 47 48 disabledTests = [ 49 # assert exact error message of pyparsing which changed and no longer matches 50 # https://github.com/eerimoq/asn1tools/issues/167 51 "test_parse_error" 52 ]; 53 54 meta = with lib; { 55 description = "ASN.1 parsing, encoding and decoding"; 56 mainProgram = "asn1tools"; 57 homepage = "https://github.com/eerimoq/asn1tools"; 58 changelog = "https://github.com/eerimoq/asn1tools/releases/tag/${version}"; 59 license = licenses.mit; 60 maintainers = [ ]; 61 }; 62}