forked from mirrors/nixpkgs
pythonPackages.pyhcl: init at 0.4.0
This commit is contained in:
parent
268180742c
commit
dac34b3803
46
pkgs/development/python-modules/pyhcl/default.nix
Normal file
46
pkgs/development/python-modules/pyhcl/default.nix
Normal file
|
@ -0,0 +1,46 @@
|
||||||
|
{ buildPythonPackage
|
||||||
|
, fetchFromGitHub
|
||||||
|
, isPy3k
|
||||||
|
, lib
|
||||||
|
|
||||||
|
# pythonPackages
|
||||||
|
, coverage
|
||||||
|
, pytest
|
||||||
|
}:
|
||||||
|
|
||||||
|
buildPythonPackage rec {
|
||||||
|
pname = "pyhcl";
|
||||||
|
version = "0.4.0";
|
||||||
|
disabled = !isPy3k;
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "virtuald";
|
||||||
|
repo = pname;
|
||||||
|
rev = version;
|
||||||
|
sha256 = "09kwm3digbwn3kmbk76jswxgwfcfchik6cfa2xbhjanh4xs893hs";
|
||||||
|
};
|
||||||
|
|
||||||
|
# https://github.com/virtuald/pyhcl/blob/51a7524b68fe21e175e157b8af931016d7a357ad/setup.py#L64
|
||||||
|
configurePhase = ''
|
||||||
|
echo '__version__ = "${version}"' > ./src/hcl/version.py
|
||||||
|
'';
|
||||||
|
|
||||||
|
checkInputs = [
|
||||||
|
coverage
|
||||||
|
pytest
|
||||||
|
];
|
||||||
|
|
||||||
|
# https://github.com/virtuald/pyhcl/blob/51a7524b68fe21e175e157b8af931016d7a357ad/tests/run_tests.sh#L4
|
||||||
|
checkPhase = ''
|
||||||
|
coverage run --source hcl -m pytest tests
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
description = "HCL is a configuration language. pyhcl is a python parser for it";
|
||||||
|
homepage = "https://github.com/virtuald/pyhcl";
|
||||||
|
license = licenses.mpl20;
|
||||||
|
maintainers = with maintainers; [
|
||||||
|
kamadorueda
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
|
@ -2256,6 +2256,8 @@ in {
|
||||||
|
|
||||||
python-ly = callPackage ../development/python-modules/python-ly {};
|
python-ly = callPackage ../development/python-modules/python-ly {};
|
||||||
|
|
||||||
|
pyhcl = callPackage ../development/python-modules/pyhcl { };
|
||||||
|
|
||||||
pyhepmc = callPackage ../development/python-modules/pyhepmc { };
|
pyhepmc = callPackage ../development/python-modules/pyhepmc { };
|
||||||
|
|
||||||
pytest = if isPy3k then self.pytest_5 else self.pytest_4;
|
pytest = if isPy3k then self.pytest_5 else self.pytest_4;
|
||||||
|
|
Loading…
Reference in a new issue