2021-04-18 03:25:11 +02:00
|
|
|
{ lib
|
|
|
|
, fetchFromGitHub
|
2024-01-13 09:49:10 +01:00
|
|
|
, python3
|
2021-04-18 03:25:11 +02:00
|
|
|
}:
|
2024-01-13 09:49:10 +01:00
|
|
|
|
|
|
|
let
|
|
|
|
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;
|
|
|
|
|
2021-04-18 03:25:11 +02:00
|
|
|
python3.pkgs.buildPythonApplication rec {
|
|
|
|
pname = "cyclonedx-python";
|
2024-01-13 09:49:10 +01:00
|
|
|
version = "3.11.7";
|
|
|
|
pyproject = true;
|
2021-04-18 03:25:11 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "CycloneDX";
|
|
|
|
repo = "cyclonedx-python";
|
2024-01-13 09:49:10 +01:00
|
|
|
rev = "refs/tags/v${version}";
|
|
|
|
sha256 = "sha256-jU/0FkQCyph59TnEE+lckJXsU9whfvWp7dkdfzprYw8=";
|
2021-04-18 03:25:11 +02:00
|
|
|
};
|
|
|
|
|
2024-01-13 09:49:10 +01:00
|
|
|
nativeBuildInputs = with py.pkgs; [
|
|
|
|
poetry-core
|
|
|
|
pythonRelaxDepsHook
|
|
|
|
];
|
2021-04-18 03:25:11 +02:00
|
|
|
|
2024-01-13 09:49:10 +01:00
|
|
|
propagatedBuildInputs = with py.pkgs; [
|
|
|
|
chardet
|
|
|
|
cyclonedx-python-lib
|
2021-04-18 03:25:11 +02:00
|
|
|
packageurl-python
|
2024-01-13 09:49:10 +01:00
|
|
|
pip-requirements-parser
|
2021-04-18 03:25:11 +02:00
|
|
|
setuptools
|
2024-01-13 09:49:10 +01:00
|
|
|
toml
|
2021-04-18 03:25:11 +02:00
|
|
|
];
|
|
|
|
|
2024-01-13 09:49:10 +01:00
|
|
|
# The tests want access to the cyclonedx binary
|
2021-04-18 03:25:11 +02:00
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"cyclonedx"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Creates CycloneDX Software Bill of Materials (SBOM) from Python projects";
|
|
|
|
homepage = "https://github.com/CycloneDX/cyclonedx-python";
|
2024-01-13 09:49:10 +01:00
|
|
|
changelog = "https://github.com/CycloneDX/cyclonedx-python/releases/tag/v${version}";
|
2021-04-18 03:25:11 +02:00
|
|
|
license = licenses.asl20;
|
2024-01-13 09:49:10 +01:00
|
|
|
maintainers = with maintainers; [ ];
|
2023-11-27 02:17:53 +01:00
|
|
|
mainProgram = "cyclonedx-py";
|
2021-04-18 03:25:11 +02:00
|
|
|
};
|
|
|
|
}
|