bottom: add gpu recognition, new apple sdk, refactor (#360568)
[NixPkgs.git] / pkgs / by-name / io / ioccheck / package.nix
blob220710d01559529a479bb6ed5e3e58f57634099f
2   lib,
3   fetchFromGitHub,
4   python3,
5 }:
7 let
8   py = python3.override {
9     self = py;
10     packageOverrides = self: super: {
11       emoji = super.emoji.overridePythonAttrs rec {
12         version = "1.7.0";
14         src = fetchFromGitHub {
15           owner = "carpedm20";
16           repo = "emoji";
17           rev = "v${version}";
18           hash = "sha256-vKQ51RP7uy57vP3dOnHZRSp/Wz+YDzeLUR8JnIELE/I=";
19         };
20       };
22       # Support for later tweepy releases is missing
23       # https://github.com/ranguli/ioccheck/issues/70
24       tweepy = super.tweepy.overridePythonAttrs rec {
25         version = "3.10.0";
27         src = fetchFromGitHub {
28           owner = "tweepy";
29           repo = "tweepy";
30           rev = "v${version}";
31           hash = "sha256-3BbQeCaAhlz9h5GnhficNubJHu4kTpnCDM4oKzlti0w=";
32         };
33         doCheck = false;
34       };
35     };
36   };
38 py.pkgs.buildPythonApplication rec {
39   pname = "ioccheck";
40   version = "unstable-2021-09-29";
41   pyproject = true;
43   src = fetchFromGitHub {
44     owner = "ranguli";
45     repo = "ioccheck";
46     rev = "db02d921e2519b77523a200ca2d78417802463db";
47     hash = "sha256-qf5tHIpbj/BfrzUST+EzohKh1hUg09KwF+vT0tj1+FE=";
48   };
50   nativeBuildInputs = with py.pkgs; [
51     poetry-core
52   ];
54   pythonRelaxDeps = [
55     "backoff"
56     "pyfiglet"
57     "tabulate"
58     "termcolor"
59     "vt-py"
60   ];
62   propagatedBuildInputs = with py.pkgs; [
63     backoff
64     click
65     emoji
66     jinja2
67     pyfiglet
68     ratelimit
69     requests
70     shodan
71     tabulate
72     termcolor
73     tweepy
74     vt-py
75   ];
77   nativeCheckInputs = with py.pkgs; [
78     pytestCheckHook
79   ];
81   postPatch = ''
82     # Can be removed with the next release
83     substituteInPlace pyproject.toml \
84       --replace '"hurry.filesize" = "^0.9"' ""
85   '';
87   pythonImportsCheck = [
88     "ioccheck"
89   ];
91   meta = with lib; {
92     description = "Tool for researching IOCs";
93     mainProgram = "ioccheck";
94     homepage = "https://github.com/ranguli/ioccheck";
95     license = with licenses; [ mit ];
96     maintainers = with maintainers; [ fab ];
97   };