Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 21.05 93 lines 2.1 kB view raw
1{ lib 2, buildPythonPackage 3, callPackage 4, fetchFromGitHub 5, cerberus 6, configparser 7, deepdiff 8, geoip2 9, jinja2 10, openpyxl 11, tabulate 12, yangson 13, pytestCheckHook 14, pyyaml 15}: 16 17let 18 ttp_templates = callPackage ./templates.nix { }; 19in 20buildPythonPackage rec { 21 pname = "ttp"; 22 version = "0.6.0"; 23 format = "setuptools"; 24 25 src = fetchFromGitHub { 26 owner = "dmulyalin"; 27 repo = pname; 28 rev = version; 29 sha256 = "08pglwmnhdrsj9rgys1zclhq1h597izb0jq7waahpdabfg25v2sw"; 30 }; 31 32 propagatedBuildInputs = [ 33 # https://github.com/dmulyalin/ttp/blob/master/docs/source/Installation.rst#additional-dependencies 34 cerberus 35 configparser 36 deepdiff 37 geoip2 38 jinja2 39 # n2g unpackaged 40 # netmiko unpackaged 41 # nornir unpackaged 42 openpyxl 43 tabulate 44 yangson 45 ]; 46 47 pythonImportsCheck = [ 48 "ttp" 49 ]; 50 51 checkInputs = [ 52 pytestCheckHook 53 pyyaml 54 ttp_templates 55 ]; 56 57 disabledTestPaths = [ 58 # missing package n2g 59 "test/pytest/test_N2G_formatter.py" 60 ]; 61 62 disabledTests = [ 63 # data structure mismatches 64 "test_yangson_validate" 65 "test_yangson_validate_yang_lib_in_output_tag_data" 66 "test_yangson_validate_multiple_inputs_mode_per_input_with_yang_lib_in_file" 67 "test_yangson_validate_multiple_inputs_mode_per_template" 68 "test_yangson_validate_multiple_inputs_mode_per_input_with_yang_lib_in_file_to_xml" 69 "test_yangson_validate_multiple_inputs_mode_per_template_to_xml" 70 "test_adding_data_from_files" 71 "test_lookup_include_csv" 72 "test_inputs_with_template_base_path" 73 "test_group_inputs" 74 "test_inputs_url_filters_extensions" 75 # ValueError: dictionary update sequence element #0 has length 1; 2 is required 76 "test_include_attribute_with_yaml_loader" 77 # TypeError: string indices must be integers 78 "test_lookup_include_yaml" 79 # missing package n2g 80 "test_n2g_formatter" 81 ]; 82 83 pytestFlagsArray = [ 84 "test/pytest" 85 ]; 86 87 meta = with lib; { 88 description = "Template Text Parser"; 89 homepage = "https://github.com/dmulyalin/ttp"; 90 license = licenses.mit; 91 maintainers = with maintainers; [ hexa ]; 92 }; 93}