1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, pyyaml
5, jinja2
6}:
7
8buildPythonPackage rec {
9 pname = "hiyapyco";
10 version = "0.4.16";
11
12 src = fetchFromGitHub {
13 owner = "zerwes";
14 repo = pname;
15 rev = "release-${version}";
16 sha256 = "1ams9dp05yhgbg6255wrjgchl2mqg0s34d8b8prvql9lsh59s1fj";
17 };
18
19 propagatedBuildInputs = [
20 pyyaml
21 jinja2
22 ];
23
24 postPatch = ''
25 # Should no longer be needed with the next release
26 # https://github.com/zerwes/hiyapyco/pull/42
27 substituteInPlace setup.py \
28 --replace "Jinja2>1,<3" "Jinja2>1"
29 '';
30
31 checkPhase = ''
32 set -e
33 find test -name 'test_*.py' -exec python {} \;
34 '';
35
36 pythonImportsCheck = [ "hiyapyco" ];
37
38 meta = with lib; {
39 description = "Python library allowing hierarchical overlay of config files in YAML syntax";
40 homepage = "https://github.com/zerwes/hiyapyco";
41 license = licenses.gpl3Plus;
42 maintainers = with maintainers; [ veehaitch ];
43 };
44}