diff --git a/pkgs/development/python-modules/cpe-search/default.nix b/pkgs/development/python-modules/cpe-search/default.nix new file mode 100644 index 000000000000..d514f42e084c --- /dev/null +++ b/pkgs/development/python-modules/cpe-search/default.nix @@ -0,0 +1,59 @@ +{ + lib, + aiohttp, + aiolimiter, + buildPythonPackage, + fetchFromGitHub, + hatchling, + mariadb, + requests, + ujson, +}: + +buildPythonPackage rec { + pname = "cpe-search"; + version = "0.1.7"; + pyproject = true; + + src = fetchFromGitHub { + owner = "ra1nb0rn"; + repo = "cpe_search"; + tag = "v${version}"; + hash = "sha256-gCWKVSVDJNspRwDzHi7+vUETGErWYs3jlpsqkOqSY4I="; + }; + + build-system = [ hatchling ]; + + dependencies = [ + aiohttp + aiolimiter + requests + ujson + ]; + + optional-dependencies = { + all = [ + aiohttp + aiolimiter + mariadb + requests + ujson + ]; + mariadb = [ + mariadb + ]; + }; + + # Tests requires DB and API access + doCheck = false; + + pythonImportsCheck = [ "cpe_search" ]; + + meta = { + description = "Search for Common Platform Enumeration (CPE) strings using software names and titles"; + homepage = "https://github.com/ra1nb0rn/cpe_search"; + changelog = "https://github.com/ra1nb0rn/cpe_search/blob/${src.tag}/CHANGELOG.md"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index e45622952ab8..e3a8a2e5eb07 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -3174,6 +3174,8 @@ self: super: with self; { cpe = callPackage ../development/python-modules/cpe { }; + cpe-search = callPackage ../development/python-modules/cpe-search { }; + cppe = callPackage ../development/python-modules/cppe { inherit (pkgs) cppe; }; cppheaderparser = callPackage ../development/python-modules/cppheaderparser { };