From d9f87b224fdfb810e04099556bda91b6f822c6a5 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 16 Apr 2021 00:02:01 +0200 Subject: [PATCH] python3Packages.mwdblib: init at 3.4.0 --- .../python-modules/mwdblib/default.nix | 49 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 51 insertions(+) create mode 100644 pkgs/development/python-modules/mwdblib/default.nix diff --git a/pkgs/development/python-modules/mwdblib/default.nix b/pkgs/development/python-modules/mwdblib/default.nix new file mode 100644 index 000000000000..e73cf06194fe --- /dev/null +++ b/pkgs/development/python-modules/mwdblib/default.nix @@ -0,0 +1,49 @@ +{ lib +, beautifultable +, buildPythonPackage +, click +, click-default-group +, fetchFromGitHub +, humanize +, keyring +, python +, python-dateutil +, requests +}: + +buildPythonPackage rec { + pname = "mwdblib"; + version = "3.4.0"; + + src = fetchFromGitHub { + owner = "CERT-Polska"; + repo = pname; + rev = "v${version}"; + sha256 = "0dbdmps4a3mav02m4h37bj2bw8pg6h52yf3gpdkhi3k9hl9f942h"; + }; + + propagatedBuildInputs = [ + beautifultable + click + click-default-group + humanize + keyring + python-dateutil + requests + ]; + + checkPhase = '' + runHook preCheck + ${python.interpreter} -m unittest discover + runHook postCheck + ''; + + pythonImportsCheck = [ "mwdblib" ]; + + meta = with lib; { + description = "Python client library for the mwdb service"; + homepage = "https://github.com/CERT-Polska/mwdblib"; + license = with licenses; [ bsd3 ]; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 393dcfeb0f6e..7b3941bd6a86 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -4518,6 +4518,8 @@ in { mwclient = callPackage ../development/python-modules/mwclient { }; + mwdblib = callPackage ../development/python-modules/mwdblib { }; + mwlib = callPackage ../development/python-modules/mwlib { }; mwlib-ext = callPackage ../development/python-modules/mwlib-ext { };