2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
docopt,
|
|
|
|
fetchFromGitHub,
|
|
|
|
flit-core,
|
|
|
|
hypothesis,
|
|
|
|
inform,
|
|
|
|
nestedtext,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
|
|
|
quantiphy,
|
|
|
|
voluptuous,
|
2020-11-09 15:59:12 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "nestedtext";
|
2024-05-15 15:35:15 +00:00
|
|
|
version = "3.7";
|
2023-03-08 16:32:21 +00:00
|
|
|
format = "pyproject";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2020-11-09 15:59:12 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "KenKundert";
|
|
|
|
repo = "nestedtext";
|
2023-03-08 16:32:21 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2024-05-15 15:35:15 +00:00
|
|
|
hash = "sha256-lNqSmEmzuRGdXs/4mwKSh7yDGHnAykpIDIR+abbLCns=";
|
2020-11-09 15:59:12 +00:00
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeBuildInputs = [ flit-core ];
|
2023-03-08 16:32:21 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
propagatedBuildInputs = [ inform ];
|
2023-03-08 16:32:21 +00:00
|
|
|
|
|
|
|
nativeCheckInputs = [
|
|
|
|
docopt
|
|
|
|
hypothesis
|
|
|
|
quantiphy
|
|
|
|
pytestCheckHook
|
|
|
|
voluptuous
|
|
|
|
];
|
|
|
|
|
|
|
|
# Tests depend on quantiphy. To avoid infinite recursion, tests are only
|
|
|
|
# enabled when building passthru.tests.
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
pytestFlagsArray = [
|
|
|
|
# Avoids an ImportMismatchError.
|
|
|
|
"--ignore=build"
|
|
|
|
];
|
|
|
|
|
|
|
|
disabledTestPaths = [
|
|
|
|
# Examples are prefixed with test_
|
|
|
|
"examples/"
|
|
|
|
];
|
|
|
|
|
|
|
|
passthru.tests = {
|
2024-06-05 15:53:02 +00:00
|
|
|
runTests = nestedtext.overrideAttrs (_: {
|
|
|
|
doCheck = true;
|
|
|
|
});
|
2023-03-08 16:32:21 +00:00
|
|
|
};
|
2020-11-09 15:59:12 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "nestedtext" ];
|
2020-11-09 15:59:12 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Human friendly data format";
|
2020-11-09 15:59:12 +00:00
|
|
|
longDescription = ''
|
|
|
|
NestedText is a file format for holding data that is to be entered,
|
|
|
|
edited, or viewed by people. It allows data to be organized into a nested
|
|
|
|
collection of dictionaries, lists, and strings. In this way it is similar
|
|
|
|
to JSON, YAML and TOML, but without the complexity and risk of YAML and
|
|
|
|
without the syntactic clutter of JSON and TOML. NestedText is both simple
|
|
|
|
and natural. Only a small number of concepts and rules must be kept in
|
|
|
|
mind when creating it. It is easily created, modified, or viewed with a
|
|
|
|
text editor and easily understood and used by both programmers and
|
|
|
|
non-programmers.
|
|
|
|
'';
|
|
|
|
homepage = "https://nestedtext.org";
|
2023-03-08 16:32:21 +00:00
|
|
|
changelog = "https://github.com/KenKundert/nestedtext/blob/v${version}/doc/releases.rst";
|
2020-11-09 15:59:12 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ jeremyschlatter ];
|
|
|
|
};
|
|
|
|
}
|