depot/third_party/nixpkgs/pkgs/development/python-modules/pycep-parser/default.nix
Default email a0cb138ada Project import generated by Copybara.
GitOrigin-RevId: a100acd7bbf105915b0004427802286c37738fef
2023-02-02 18:25:31 +00:00

57 lines
1,000 B
Nix

{ lib
, assertpy
, buildPythonPackage
, fetchFromGitHub
, lark
, poetry-core
, pytestCheckHook
, pythonOlder
, regex
, typing-extensions
}:
buildPythonPackage rec {
pname = "pycep-parser";
version = "0.3.9";
format = "pyproject";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "gruebel";
repo = "pycep";
rev = "refs/tags/${version}";
hash = "sha256-CghTNdZZJJOakMySNPRCTYx+1aEY8ROUvS9loc9JcPo=";
};
nativeBuildInputs = [
poetry-core
];
propagatedBuildInputs = [
lark
regex
typing-extensions
];
nativeCheckInputs = [
assertpy
pytestCheckHook
];
postPatch = ''
substituteInPlace pyproject.toml \
--replace 'regex = "^2022.3.15"' 'regex = "*"'
'';
pythonImportsCheck = [
"pycep"
];
meta = with lib; {
description = "Python based Bicep parser";
homepage = "https://github.com/gruebel/pycep";
license = with licenses; [ asl20 ];
maintainers = with maintainers; [ fab ];
};
}