2020-05-29 06:06:01 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pyyaml
|
|
|
|
, jinja2
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2021-09-26 12:46:18 +00:00
|
|
|
pname = "hiyapyco";
|
2022-08-12 12:06:08 +00:00
|
|
|
version = "0.5.0";
|
2020-05-29 06:06:01 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "zerwes";
|
|
|
|
repo = pname;
|
2022-08-12 12:06:08 +00:00
|
|
|
rev = "refs/tags/release-${version}";
|
|
|
|
sha256 = "sha256-v+q7MOJvRc8rzBzwf27jmuIHpZeYGDK7VbzB98qnhrQ=";
|
2020-05-29 06:06:01 +00:00
|
|
|
};
|
|
|
|
|
2021-09-26 12:46:18 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
pyyaml
|
|
|
|
jinja2
|
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
# Should no longer be needed with the next release
|
|
|
|
# https://github.com/zerwes/hiyapyco/pull/42
|
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace "Jinja2>1,<3" "Jinja2>1"
|
|
|
|
'';
|
2020-05-29 06:06:01 +00:00
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
set -e
|
|
|
|
find test -name 'test_*.py' -exec python {} \;
|
|
|
|
'';
|
|
|
|
|
2021-09-26 12:46:18 +00:00
|
|
|
pythonImportsCheck = [ "hiyapyco" ];
|
|
|
|
|
2020-05-29 06:06:01 +00:00
|
|
|
meta = with lib; {
|
2021-09-26 12:46:18 +00:00
|
|
|
description = "Python library allowing hierarchical overlay of config files in YAML syntax";
|
2020-05-29 06:06:01 +00:00
|
|
|
homepage = "https://github.com/zerwes/hiyapyco";
|
2021-09-26 12:46:18 +00:00
|
|
|
license = licenses.gpl3Plus;
|
2020-05-29 06:06:01 +00:00
|
|
|
maintainers = with maintainers; [ veehaitch ];
|
|
|
|
};
|
|
|
|
}
|