Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 21.05 50 lines 1.0 kB view raw
1{ lib 2, backoff 3, buildPythonPackage 4, fetchFromGitHub 5, pytestCheckHook 6, requests 7, pytestcov 8, requests-mock 9, parameterized 10}: 11 12buildPythonPackage rec { 13 pname = "censys"; 14 version = "1.1.1"; 15 16 src = fetchFromGitHub { 17 owner = "censys"; 18 repo = "censys-python"; 19 rev = version; 20 sha256 = "06jwk0ps80fjzbsy24qn5bsggfpgn4ccjzjz65cdh0ap1mfvh5jf"; 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}