1{ 2 lib, 3 buildPythonPackage, 4 docopt, 5 fetchFromGitHub, 6 flit-core, 7 hypothesis, 8 inform, 9 nestedtext, 10 pytestCheckHook, 11 pythonOlder, 12 quantiphy, 13 voluptuous, 14}: 15 16buildPythonPackage rec { 17 pname = "nestedtext"; 18 version = "3.7"; 19 format = "pyproject"; 20 21 disabled = pythonOlder "3.7"; 22 23 src = fetchFromGitHub { 24 owner = "KenKundert"; 25 repo = "nestedtext"; 26 tag = "v${version}"; 27 hash = "sha256-lNqSmEmzuRGdXs/4mwKSh7yDGHnAykpIDIR+abbLCns="; 28 }; 29 30 nativeBuildInputs = [ flit-core ]; 31 32 propagatedBuildInputs = [ inform ]; 33 34 nativeCheckInputs = [ 35 docopt 36 hypothesis 37 quantiphy 38 pytestCheckHook 39 voluptuous 40 ]; 41 42 # Tests depend on quantiphy. To avoid infinite recursion, tests are only 43 # enabled when building passthru.tests. 44 doCheck = false; 45 46 pytestFlagsArray = [ 47 # Avoids an ImportMismatchError. 48 "--ignore=build" 49 ]; 50 51 disabledTestPaths = [ 52 # Examples are prefixed with test_ 53 "examples/" 54 ]; 55 56 passthru.tests = { 57 runTests = nestedtext.overrideAttrs (_: { 58 doCheck = true; 59 }); 60 }; 61 62 pythonImportsCheck = [ "nestedtext" ]; 63 64 meta = with lib; { 65 description = "Human friendly data format"; 66 longDescription = '' 67 NestedText is a file format for holding data that is to be entered, 68 edited, or viewed by people. It allows data to be organized into a nested 69 collection of dictionaries, lists, and strings. In this way it is similar 70 to JSON, YAML and TOML, but without the complexity and risk of YAML and 71 without the syntactic clutter of JSON and TOML. NestedText is both simple 72 and natural. Only a small number of concepts and rules must be kept in 73 mind when creating it. It is easily created, modified, or viewed with a 74 text editor and easily understood and used by both programmers and 75 non-programmers. 76 ''; 77 homepage = "https://nestedtext.org"; 78 changelog = "https://github.com/KenKundert/nestedtext/blob/v${version}/doc/releases.rst"; 79 license = licenses.mit; 80 maintainers = with maintainers; [ jeremyschlatter ]; 81 }; 82}