1{
2 lib,
3 beautifulsoup4,
4 buildPythonPackage,
5 click,
6 fetchFromGitHub,
7 orjson,
8 pytestCheckHook,
9 pythonOlder,
10 pyyaml,
11 requests,
12 schema,
13 setuptools,
14}:
15
16buildPythonPackage rec {
17 pname = "policy-sentry";
18 version = "0.14.0";
19 pyproject = true;
20
21 disabled = pythonOlder "3.8";
22
23 src = fetchFromGitHub {
24 owner = "salesforce";
25 repo = "policy_sentry";
26 tag = version;
27 hash = "sha256-zfqQLABn//qktrFSCm42WClRYAe3yWZoxnWjI9n1jWQ=";
28 };
29
30 build-system = [ setuptools ];
31
32 dependencies = [
33 beautifulsoup4
34 click
35 orjson
36 pyyaml
37 requests
38 schema
39 ];
40
41 nativeCheckInputs = [ pytestCheckHook ];
42
43 pythonImportsCheck = [ "policy_sentry" ];
44
45 meta = with lib; {
46 description = "Python module for generating IAM least privilege policies";
47 homepage = "https://github.com/salesforce/policy_sentry";
48 changelog = "https://github.com/salesforce/policy_sentry/releases/tag/${src.tag}";
49 license = licenses.bsd3;
50 maintainers = with maintainers; [ fab ];
51 mainProgram = "policy_sentry";
52 };
53}