Merge pull request #307098 from r-ryantm/auto-update/cilium-cli
[NixPkgs.git] / pkgs / development / python-modules / corsair-scan / default.nix
blob4d7190906b262d4da7a0f34816fcce04a7acbd7d
1 { lib
2 , buildPythonPackage
3 , click
4 , fetchFromGitHub
5 , mock
6 , pytestCheckHook
7 , pythonOlder
8 , requests
9 , tldextract
10 , urllib3
11 , validators
14 buildPythonPackage rec {
15   pname = "corsair-scan";
16   version = "0.2.0";
17   format = "setuptools";
19   disabled = pythonOlder "3.8";
21   src = fetchFromGitHub {
22     owner = "Santandersecurityresearch";
23     repo = "corsair_scan";
24     rev = "refs/tags/v${version}";
25     hash = "sha256-s94ZiTL7tBrhUaeB/O3Eh8o8zqtfdt0z8LKep1bZWiY=";
26   };
28   postPatch = ''
29     substituteInPlace setup.py \
30       --replace "'pytest-runner'," ""
31   '';
33   propagatedBuildInputs = [
34     validators
35     requests
36     urllib3
37     tldextract
38     click
39   ];
41   nativeCheckInputs = [
42     mock
43     pytestCheckHook
44   ];
46   pythonImportsCheck = [
47     "corsair_scan"
48   ];
50   disabledTests = [
51     # Tests want to download Public Suffix List
52     "test_corsair_scan_401"
53     "test_corsair_scan_origin"
54   ];
56   meta = with lib; {
57     description = "Python module to check for Cross-Origin Resource Sharing (CORS) misconfigurations";
58     mainProgram = "corsair";
59     homepage = "https://github.com/Santandersecurityresearch/corsair_scan";
60     changelog = "https://github.com/Santandersecurityresearch/corsair_scan/releases/tag/v${version}";
61     license = with licenses; [ mit ];
62     maintainers = with maintainers; [ fab ];
63   };