at master 1.4 kB view raw
1{ 2 lib, 3 argcomplete, 4 backoff, 5 buildPythonPackage, 6 fetchFromGitHub, 7 importlib-metadata, 8 parameterized, 9 poetry-core, 10 pytest-mock, 11 pytest-cov-stub, 12 pytestCheckHook, 13 pythonOlder, 14 requests, 15 requests-mock, 16 responses, 17 rich, 18 writableTmpDirAsHomeHook, 19}: 20 21buildPythonPackage rec { 22 pname = "censys"; 23 version = "2.2.18"; 24 pyproject = true; 25 26 disabled = pythonOlder "3.8"; 27 28 src = fetchFromGitHub { 29 owner = "censys"; 30 repo = "censys-python"; 31 tag = "v${version}"; 32 hash = "sha256-fHqDXqhjqfj8VBb7Od7wuUXAEHQBXwm5LAUPLM0oN2Q="; 33 }; 34 35 build-system = [ poetry-core ]; 36 37 dependencies = [ 38 argcomplete 39 backoff 40 requests 41 rich 42 importlib-metadata 43 ]; 44 45 nativeCheckInputs = [ 46 parameterized 47 pytest-mock 48 pytest-cov-stub 49 pytestCheckHook 50 requests-mock 51 responses 52 writableTmpDirAsHomeHook 53 ]; 54 55 # The tests want to write a configuration file 56 preCheck = '' 57 mkdir -p $HOME 58 ''; 59 60 pythonImportsCheck = [ "censys" ]; 61 62 meta = with lib; { 63 description = "Python API wrapper for the Censys Search Engine (censys.io)"; 64 homepage = "https://github.com/censys/censys-python"; 65 changelog = "https://github.com/censys/censys-python/releases/tag/v${src.tag}"; 66 license = licenses.asl20; 67 maintainers = with maintainers; [ fab ]; 68 mainProgram = "censys"; 69 }; 70}