Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 jsonschema, 6 unittestCheckHook, 7 pythonOlder, 8 setuptools, 9}: 10 11buildPythonPackage rec { 12 pname = "cvss"; 13 version = "3.1"; 14 pyproject = true; 15 16 disabled = pythonOlder "3.7"; 17 18 src = fetchFromGitHub { 19 owner = "RedHatProductSecurity"; 20 repo = "cvss"; 21 rev = "refs/tags/v${version}"; 22 hash = "sha256-e/zwOfbt3YLlRiLFObjps3tFFk6BAWBKdanio6sus8c="; 23 }; 24 25 nativeBuildInputs = [ setuptools ]; 26 27 nativeCheckInputs = [ 28 jsonschema 29 unittestCheckHook 30 ]; 31 32 pythonImportsCheck = [ "cvss" ]; 33 34 preCheck = '' 35 cd tests 36 ''; 37 38 meta = with lib; { 39 description = "Library for CVSS2/3/4"; 40 mainProgram = "cvss_calculator"; 41 homepage = "https://github.com/RedHatProductSecurity/cvss"; 42 changelog = "https://github.com/RedHatProductSecurity/cvss/releases/tag/v${version}"; 43 license = with licenses; [ lgpl3Plus ]; 44 maintainers = with maintainers; [ fab ]; 45 }; 46}