From 375b0b5d72a81f6cf49b546a14eac94cec1851e3 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 14 Apr 2022 22:40:13 +0200 Subject: [PATCH] python3Packages.cyclonedx-python-lib: 2.0.0 -> 2.2.0 --- .../cyclonedx-python-lib/default.nix | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/pkgs/development/python-modules/cyclonedx-python-lib/default.nix b/pkgs/development/python-modules/cyclonedx-python-lib/default.nix index af638894831d..34acc734253c 100644 --- a/pkgs/development/python-modules/cyclonedx-python-lib/default.nix +++ b/pkgs/development/python-modules/cyclonedx-python-lib/default.nix @@ -6,27 +6,28 @@ , lxml , packageurl-python , poetry-core -, pytestCheckHook +, python , pythonOlder , requirements-parser , setuptools , toml , types-setuptools , types-toml +, xmldiff }: buildPythonPackage rec { pname = "cyclonedx-python-lib"; - version = "2.0.0"; + version = "2.2.0"; format = "pyproject"; - disabled = pythonOlder "3.6"; + disabled = pythonOlder "3.9"; src = fetchFromGitHub { owner = "CycloneDX"; repo = pname; rev = "v${version}"; - hash = "sha256-S1bcUCHe4UYJuSHI8LMQZ/reS6YAE0hxrpw+QweFm/8="; + hash = "sha256-QylA3bf0P65prR74H5+Sm51xWjjhOYpe4jHX7m/f6mI="; }; nativeBuildInputs = [ @@ -46,13 +47,21 @@ buildPythonPackage rec { checkInputs = [ jsonschema lxml - pytestCheckHook + xmldiff ]; pythonImportsCheck = [ "cyclonedx" ]; + checkPhase = '' + runHook preCheck + # Tests require network access + rm tests/test_output_json.py + ${python.interpreter} -m unittest discover -s tests -v + runHook postCheck + ''; + meta = with lib; { description = "Python library for generating CycloneDX SBOMs"; homepage = "https://github.com/CycloneDX/cyclonedx-python-lib";