Merge pull request #329874 from cyberus-technology/cyclonedx-python-4.5.0

cyclonedx-python: 3.11.7 -> 4.5.0
This commit is contained in:
Fabian Affolter 2024-07-28 18:52:11 +02:00 committed by GitHub
commit 52ec9ac3b1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 22 additions and 41 deletions

View File

@ -82,6 +82,12 @@ buildPythonPackage rec {
"tests/test_output_xml.py" "tests/test_output_xml.py"
]; ];
passthru.optional-dependencies = {
validation = [
jsonschema
];
};
meta = with lib; { meta = with lib; {
description = "Python library for generating CycloneDX SBOMs"; description = "Python library for generating CycloneDX SBOMs";
homepage = "https://github.com/CycloneDX/cyclonedx-python-lib"; homepage = "https://github.com/CycloneDX/cyclonedx-python-lib";

View File

@ -1,65 +1,40 @@
{ lib {
, fetchFromGitHub lib,
, python3 fetchFromGitHub,
python3Packages,
}: }:
let python3Packages.buildPythonApplication rec {
py = python3.override {
packageOverrides = self: super: {
# Requires 'cyclonedx-python-lib = ">= 2.0.0, < 4.0.0"'
cyclonedx-python-lib = super.cyclonedx-python-lib.overridePythonAttrs (oldAttrs: rec {
version = "3.1.5";
src = fetchFromGitHub {
owner = "CycloneDX";
repo = "cyclonedx-python-lib";
rev = "refs/tags/v${version}";
hash = "sha256-4lA8OdmvQD94jTeDf+Iz7ZyEQ9fZzCxnXQG9Ir8FKhk=";
};
});
};
};
in
with py.pkgs;
python3.pkgs.buildPythonApplication rec {
pname = "cyclonedx-python"; pname = "cyclonedx-python";
version = "3.11.7"; version = "4.5.0";
pyproject = true; pyproject = true;
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "CycloneDX"; owner = "CycloneDX";
repo = "cyclonedx-python"; repo = "cyclonedx-python";
rev = "refs/tags/v${version}"; rev = "refs/tags/v${version}";
sha256 = "sha256-jU/0FkQCyph59TnEE+lckJXsU9whfvWp7dkdfzprYw8="; hash = "sha256-+XeMRREDX1+v+qOeYiHh7uhadfueYYOxspLY3q1NL6s=";
}; };
nativeBuildInputs = with py.pkgs; [ build-system = with python3Packages; [ poetry-core ];
poetry-core
];
propagatedBuildInputs = with py.pkgs; [ dependencies = with python3Packages; [
chardet chardet
cyclonedx-python-lib cyclonedx-python-lib
packageurl-python packageurl-python
pip-requirements-parser pip-requirements-parser
setuptools packaging
toml tomli
]; ] ++ cyclonedx-python-lib.optional-dependencies.validation;
# The tests want access to the cyclonedx binary pythonImportsCheck = [ "cyclonedx" ];
doCheck = false;
pythonImportsCheck = [ meta = {
"cyclonedx"
];
meta = with lib; {
description = "Creates CycloneDX Software Bill of Materials (SBOM) from Python projects"; description = "Creates CycloneDX Software Bill of Materials (SBOM) from Python projects";
homepage = "https://github.com/CycloneDX/cyclonedx-python"; homepage = "https://github.com/CycloneDX/cyclonedx-python";
changelog = "https://github.com/CycloneDX/cyclonedx-python/releases/tag/v${version}"; changelog = "https://github.com/CycloneDX/cyclonedx-python/releases/tag/v${version}";
license = licenses.asl20; license = lib.licenses.asl20;
maintainers = with maintainers; [ ]; maintainers = with lib.maintainers; [ xanderio ];
mainProgram = "cyclonedx-py"; mainProgram = "cyclonedx-py";
}; };
} }