From 7358662028a82db4715868fdd3610383f84ea6e7 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 17 Jan 2021 23:32:36 +0100 Subject: [PATCH] python3Packages.censys: init at 1.1.0 --- .../python-modules/censys/default.nix | 50 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 52 insertions(+) create mode 100644 pkgs/development/python-modules/censys/default.nix diff --git a/pkgs/development/python-modules/censys/default.nix b/pkgs/development/python-modules/censys/default.nix new file mode 100644 index 000000000000..561d9651fed8 --- /dev/null +++ b/pkgs/development/python-modules/censys/default.nix @@ -0,0 +1,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 ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 195fee99a907..21abf91b483b 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -1171,6 +1171,8 @@ in { cement = callPackage ../development/python-modules/cement { }; + censys = callPackage ../development/python-modules/censys { }; + connect-box = callPackage ../development/python-modules/connect_box { }; cerberus = callPackage ../development/python-modules/cerberus { };