1{ lib 2, assertpy 3, buildPythonPackage 4, fetchFromGitHub 5, lark 6, poetry-core 7, pytestCheckHook 8, pythonOlder 9, regex 10, typing-extensions 11}: 12 13buildPythonPackage rec { 14 pname = "pycep-parser"; 15 version = "0.3.9"; 16 format = "pyproject"; 17 18 disabled = pythonOlder "3.7"; 19 20 src = fetchFromGitHub { 21 owner = "gruebel"; 22 repo = "pycep"; 23 rev = "refs/tags/${version}"; 24 hash = "sha256-CghTNdZZJJOakMySNPRCTYx+1aEY8ROUvS9loc9JcPo="; 25 }; 26 27 nativeBuildInputs = [ 28 poetry-core 29 ]; 30 31 propagatedBuildInputs = [ 32 lark 33 regex 34 typing-extensions 35 ]; 36 37 checkInputs = [ 38 assertpy 39 pytestCheckHook 40 ]; 41 42 postPatch = '' 43 substituteInPlace pyproject.toml \ 44 --replace 'regex = "^2022.3.15"' 'regex = "*"' 45 ''; 46 47 pythonImportsCheck = [ 48 "pycep" 49 ]; 50 51 meta = with lib; { 52 description = "Python based Bicep parser"; 53 homepage = "https://github.com/gruebel/pycep"; 54 license = with licenses; [ asl20 ]; 55 maintainers = with maintainers; [ fab ]; 56 }; 57}