1{ lib
2, fetchFromGitHub
3, python3Packages
4}:
5
6python3Packages.buildPythonApplication rec {
7 pname = "replacement";
8 version = "0.4.4";
9
10 disabled = python3Packages.isPy27;
11
12 src = fetchFromGitHub {
13 owner = "siriobalmelli";
14 repo = "replacement";
15 rev = "v${version}";
16 sha256 = "0j4lvn3rx1kqvxcsd8nhc2lgk48jyyl7qffhlkvakhy60f9lymj3";
17 };
18
19 propagatedBuildInputs = with python3Packages; [
20 ruamel-yaml
21 ];
22
23 nativeCheckInputs = with python3Packages; [
24 pytestCheckHook
25 sh
26 ];
27
28 meta = with lib; {
29 homepage = "https://github.com/siriobalmelli/replacement";
30 description = "A tool to execute yaml templates and output text";
31 longDescription = ''
32 Replacement is a python utility
33 that parses a yaml template and outputs text.
34
35 A 'template' is a YAML file containing a 'replacement' object.
36
37 A 'replacement' object contains a list of blocks,
38 each of which is executed in sequence.
39
40 This tool is useful in generating configuration files,
41 static websites and the like.
42 '';
43 license = licenses.asl20;
44 maintainers = with maintainers; [ siriobalmelli ];
45 };
46}