git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #129474 from fabaff/bump-theharvester
commit664ebda061df7791a14aac226ccda5526d218632 authorSandro <sandro.jaeckel@gmail.com> dateFri 9 Jul 2021, 01:13 (5 years ago) parenta55886f20e4bb6
3 files changed+81−7
pkgs/development/python-modules/slowapi/default.nix+63 pkgs/tools/security/theharvester/default.nix+16−7 pkgs/top-level/python-packages.nix+2
pkgs/development/python-modules/slowapi/default.nixnew file+63
@@ -0,0 +1,63 @@
1+{ lib
2+, buildPythonPackage
3+, fastapi
4+, fetchFromGitHub
5+, fetchpatch
6+, limits
7+, mock
8+, hiro
9+, poetry-core
10+, pytestCheckHook
11+, pythonOlder
12+, redis
13+, starlette
14+}:
15+
16+buildPythonPackage rec {
17+ pname = "slowapi";
18+ version = "0.1.4";
19+ format = "pyproject";
20+ disabled = pythonOlder "3.6";
21+
22+ src = fetchFromGitHub {
23+ owner = "laurentS";
24+ repo = pname;
25+ rev = "v${version}";
26+ sha256 = "0bnnzgv2wy145sdab54hljwv1b5029ndrr0y9rc2q0mraz8lf8lm";
27+ };
28+
29+ nativeBuildInputs = [
30+ poetry-core
31+ ];
32+
33+ propagatedBuildInputs = [
34+ limits
35+ redis
36+ ];
37+
38+ checkInputs = [
39+ fastapi
40+ hiro
41+ mock
42+ pytestCheckHook
43+ starlette
44+ ];
45+
46+ patches = [
47+ # Switch to poetry-core, https://github.com/laurentS/slowapi/pull/54
48+ (fetchpatch {
49+ name = "switch-to-poetry-core.patch";
50+ url = "https://github.com/laurentS/slowapi/commit/fe165f2d479f4f8e4b7dd9cd88ec0ae847b490c5.patch";
51+ sha256 = "16vjxdjjiyg8zjrgfyg9q2ym2lmnms2zy5d2cg3ccg51cfl715fi";
52+ })
53+ ];
54+
55+ pythonImportsCheck = [ "slowapi" ];
56+
57+ meta = with lib; {
58+ description = "Python library for API rate limiting";
59+ homepage = "https://github.com/laurentS/slowapi";
60+ license = with licenses; [ mit ];
61+ maintainers = with maintainers; [ fab ];
62+ };
63+}
pkgs/tools/security/theharvester/default.nix+16−7
@@ -4,8 +4,8 @@
44}:
55
66python3.pkgs.buildPythonApplication rec {
7− pname = "theHarvester";
8− version = "3.2.3";
7+ pname = "theharvester";
8+ version = "4.0.0";
99
1010 src = fetchFromGitHub {
1111 owner = "laramies";
@@ -16,6 +16,7 @@ python3.pkgs.buildPythonApplication rec {
1616
1717 propagatedBuildInputs = with python3.pkgs; [
1818 aiodns
19+ aiofiles
1920 aiohttp
2021 aiomultiprocess
2122 aiosqlite
@@ -23,8 +24,7 @@ python3.pkgs.buildPythonApplication rec {
2324 censys
2425 certifi
2526 dnspython
26− gevent
27− grequests
27+ fastapi
2828 lxml
2929 netaddr
3030 plotly
@@ -33,14 +33,23 @@ python3.pkgs.buildPythonApplication rec {
3333 requests
3434 retrying
3535 shodan
36− texttable
36+ slowapi
37+ starlette
38+ uvicorn
3739 uvloop
3840 ];
3941
40− checkInputs = [ python3.pkgs.pytest ];
42+ checkInputs = with python3.pkgs; [
43+ pytest
44+ pytest-asyncio
45+ ];
4146
42− checkPhase = "runHook preCheck ; pytest tests/test_myparser.py ; runHook postCheck";
4347 # We don't run other tests (discovery modules) because they require network access
48+ checkPhase = ''
49+ runHook preCheck
50+ pytest tests/test_myparser.py
51+ runHook postCheck
52+ '';
4453
4554 meta = with lib; {
4655 description = "Gather E-mails, subdomains and names from different public sources";
pkgs/top-level/python-packages.nix+2
@@ -8008,6 +8008,8 @@ in {
80088008
80098009 slob = callPackage ../development/python-modules/slob { };
80108010
8011+ slowapi = callPackage ../development/python-modules/slowapi { };
8012+
80118013 sly = callPackage ../development/python-modules/sly { };
80128014
80138015 smart-meter-texas = callPackage ../development/python-modules/smart-meter-texas { };