nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at litex 93 lines 2.2 kB view raw
1{ lib 2, fetchFromGitHub 3, python3 4}: 5 6let 7 py = python3.override { 8 packageOverrides = self: super: { 9 emoji = super.emoji.overridePythonAttrs (oldAttrs: rec { 10 version = "1.7.0"; 11 12 src = fetchFromGitHub { 13 owner = "carpedm20"; 14 repo = "emoji"; 15 rev = "v${version}"; 16 sha256 = "sha256-vKQ51RP7uy57vP3dOnHZRSp/Wz+YDzeLUR8JnIELE/I="; 17 }; 18 }); 19 20 # Support for later tweepy releases is missing 21 # https://github.com/ranguli/ioccheck/issues/70 22 tweepy = super.tweepy.overridePythonAttrs (oldAttrs: rec { 23 version = "3.10.0"; 24 25 src = fetchFromGitHub { 26 owner = "tweepy"; 27 repo = "tweepy"; 28 rev = "v${version}"; 29 sha256 = "0k4bdlwjna6f1k19jki4xqgckrinkkw8b9wihzymr1l04rwd05nw"; 30 }; 31 doCheck = false; 32 }); 33 }; 34 }; 35in 36with py.pkgs; 37 38buildPythonApplication rec { 39 pname = "ioccheck"; 40 version = "unstable-2021-09-29"; 41 format = "pyproject"; 42 43 src = fetchFromGitHub { 44 owner = "ranguli"; 45 repo = pname; 46 rev = "db02d921e2519b77523a200ca2d78417802463db"; 47 hash = "sha256-qf5tHIpbj/BfrzUST+EzohKh1hUg09KwF+vT0tj1+FE="; 48 }; 49 50 nativeBuildInputs = with py.pkgs; [ 51 poetry-core 52 ]; 53 54 propagatedBuildInputs = with py.pkgs; [ 55 backoff 56 click 57 emoji 58 jinja2 59 pyfiglet 60 ratelimit 61 requests 62 shodan 63 tabulate 64 termcolor 65 tweepy 66 vt-py 67 ]; 68 69 nativeCheckInputs = with py.pkgs; [ 70 pytestCheckHook 71 ]; 72 73 postPatch = '' 74 # Can be removed with the next release 75 substituteInPlace pyproject.toml \ 76 --replace '"hurry.filesize" = "^0.9"' "" \ 77 --replace 'vt-py = ">=0.6.1,<0.8.0"' 'vt-py = ">=0.6.1"' \ 78 --replace 'backoff = "^1.10.0"' 'backoff = ">=1.10.0"' \ 79 --replace 'termcolor = "^1.1.0"' 'termcolor = "*"' \ 80 --replace 'tabulate = "^0.8.9"' 'tabulate = "*"' 81 ''; 82 83 pythonImportsCheck = [ 84 "ioccheck" 85 ]; 86 87 meta = with lib; { 88 description = "Tool for researching IOCs"; 89 homepage = "https://github.com/ranguli/ioccheck"; 90 license = with licenses; [ mit ]; 91 maintainers = with maintainers; [ fab ]; 92 }; 93}