2022-03-10 19:12:11 +00:00
|
|
|
{ lib
|
|
|
|
, assertpy
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, lark
|
|
|
|
, poetry-core
|
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
|
|
|
, regex
|
|
|
|
, typing-extensions
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pycep-parser";
|
2022-06-16 17:23:12 +00:00
|
|
|
version = "0.3.7";
|
2022-03-10 19:12:11 +00:00
|
|
|
format = "pyproject";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "gruebel";
|
|
|
|
repo = "pycep";
|
2022-05-18 14:49:53 +00:00
|
|
|
rev = "refs/tags/${version}";
|
2022-06-16 17:23:12 +00:00
|
|
|
hash = "sha256-5XivzmwcJi+DrrskM0u3XBXtC5j0pjXbWHI+8mciMXM=";
|
2022-03-10 19:12:11 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
poetry-core
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
lark
|
|
|
|
regex
|
|
|
|
typing-extensions
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
assertpy
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pyproject.toml \
|
2022-04-27 09:35:20 +00:00
|
|
|
--replace 'regex = "^2022.3.15"' 'regex = "*"'
|
2022-03-10 19:12:11 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"pycep"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python based Bicep parser";
|
|
|
|
homepage = "https://github.com/gruebel/pycep";
|
|
|
|
license = with licenses; [ asl20 ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|