git.iko.soy/typeable/nixpkgs
on master help sign in
python3Packages.censys: init at 1.1.0
commit7358662028a82db4715868fdd3610383f84ea6e7 authorFabian Affolter <mail@fabian-affolter.ch> dateSun 17 Jan 2021, 23:32 (6 years ago) parent3f5d6b2
2 files changed+52
pkgs/development/python-modules/censys/default.nix+50 pkgs/top-level/python-packages.nix+2
pkgs/development/python-modules/censys/default.nixnew file+50
@@ -0,0 +1,50 @@
1+{ lib
2+, backoff
3+, buildPythonPackage
4+, fetchFromGitHub
5+, pytestCheckHook
6+, requests
7+, pytestcov
8+, requests-mock
9+, parameterized
10+}:
11+
12+buildPythonPackage rec {
13+ pname = "censys";
14+ version = "1.1.0";
15+
16+ src = fetchFromGitHub {
17+ owner = "censys";
18+ repo = "censys-python";
19+ rev = "v${version}";
20+ sha256 = "0vvd13g48i4alnqil98zc09zi5kv6l2s3kdfyg5syjxvq4lfd476";
21+ };
22+
23+ propagatedBuildInputs = [
24+ backoff
25+ requests
26+ ];
27+
28+ checkInputs = [
29+ pytestcov
30+ pytestCheckHook
31+ requests-mock
32+ parameterized
33+ ];
34+
35+ # The tests want to write a configuration file
36+ preCheck = ''
37+ export HOME=$(mktemp -d)
38+ mkdir -p $HOME
39+ '';
40+ # All other tests require an API key
41+ pytestFlagsArray = [ "tests/test_config.py" ];
42+ pythonImportsCheck = [ "censys" ];
43+
44+ meta = with lib; {
45+ description = "Python API wrapper for the Censys Search Engine (censys.io)";
46+ homepage = "https://github.com/censys/censys-python";
47+ license = with licenses; [ asl20 ];
48+ maintainers = [ maintainers.fab ];
49+ };
50+}
pkgs/top-level/python-packages.nix+2
@@ -1171,6 +1171,8 @@ in {
11711171
11721172 cement = callPackage ../development/python-modules/cement { };
11731173
1174+ censys = callPackage ../development/python-modules/censys { };
1175+
11741176 connect-box = callPackage ../development/python-modules/connect_box { };
11751177
11761178 cerberus = callPackage ../development/python-modules/cerberus { };