at 25.11-pre 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}: 19 20buildPythonPackage rec { 21 pname = "censys"; 22 version = "2.2.17"; 23 pyproject = true; 24 25 disabled = pythonOlder "3.7"; 26 27 src = fetchFromGitHub { 28 owner = "censys"; 29 repo = "censys-python"; 30 tag = "v${version}"; 31 hash = "sha256-1V7IeaV7Ro1q5UyD2DDetunaRO2L4UbF1VODg5ktqKs="; 32 }; 33 34 build-system = [ poetry-core ]; 35 36 dependencies = [ 37 argcomplete 38 backoff 39 requests 40 rich 41 importlib-metadata 42 ]; 43 44 nativeCheckInputs = [ 45 parameterized 46 pytest-mock 47 pytest-cov-stub 48 pytestCheckHook 49 requests-mock 50 responses 51 ]; 52 53 pythonRelaxDeps = [ 54 "backoff" 55 "requests" 56 "rich" 57 ]; 58 59 # The tests want to write a configuration file 60 preCheck = '' 61 export HOME=$(mktemp -d) 62 mkdir -p $HOME 63 ''; 64 65 pythonImportsCheck = [ "censys" ]; 66 67 meta = with lib; { 68 description = "Python API wrapper for the Censys Search Engine (censys.io)"; 69 homepage = "https://github.com/censys/censys-python"; 70 changelog = "https://github.com/censys/censys-python/releases/tag/v${version}"; 71 license = with licenses; [ asl20 ]; 72 maintainers = with maintainers; [ fab ]; 73 mainProgram = "censys"; 74 }; 75}