blob: 561d9651fed8cf8391f371b1302c4373acf8d1ee (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
{ lib
, backoff
, buildPythonPackage
, fetchFromGitHub
, pytestCheckHook
, requests
, pytestcov
, requests-mock
, parameterized
}:
buildPythonPackage rec {
pname = "censys";
version = "1.1.0";
src = fetchFromGitHub {
owner = "censys";
repo = "censys-python";
rev = "v${version}";
sha256 = "0vvd13g48i4alnqil98zc09zi5kv6l2s3kdfyg5syjxvq4lfd476";
};
propagatedBuildInputs = [
backoff
requests
];
checkInputs = [
pytestcov
pytestCheckHook
requests-mock
parameterized
];
# The tests want to write a configuration file
preCheck = ''
export HOME=$(mktemp -d)
mkdir -p $HOME
'';
# All other tests require an API key
pytestFlagsArray = [ "tests/test_config.py" ];
pythonImportsCheck = [ "censys" ];
meta = with lib; {
description = "Python API wrapper for the Censys Search Engine (censys.io)";
homepage = "https://github.com/censys/censys-python";
license = with licenses; [ asl20 ];
maintainers = [ maintainers.fab ];
};
}
|