nixpkgs/pkgs/development/python-modules/cvelib/default.nix
Arnout Engelen 82acf0068a
Merge pull request #205116 from raboof/cve-add-version-test
pythonPackages.cvelib: add version test
2023-01-07 11:23:12 +01:00

53 lines
996 B
Nix

{ lib
, buildPythonPackage
, click
, fetchFromGitHub
, jsonschema
, pytestCheckHook
, pythonOlder
, requests
, testers
, cve
}:
buildPythonPackage rec {
pname = "cvelib";
version = "1.2.0";
format = "setuptools";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "RedHatProductSecurity";
repo = "cvelib";
rev = "tags/${version}";
hash = "sha256-8qlXwEbgLRZ1qYtBJ1c0nv6qfIOW5zAK9eOS+n+afWQ=";
};
SETUPTOOLS_SCM_PRETEND_VERSION = "v${version}";
propagatedBuildInputs = [
click
jsonschema
requests
];
checkInputs = [
pytestCheckHook
];
pythonImportsCheck = [
"cvelib"
];
passthru.tests.version = testers.testVersion { package = cve; };
meta = with lib; {
description = "Library and a command line interface for the CVE Services API";
homepage = "https://github.com/RedHatProductSecurity/cvelib";
license = licenses.mit;
maintainers = with maintainers; [ raboof ];
mainProgram = "cve";
};
}