depot/third_party/nixpkgs/pkgs/development/python-modules/lib4sbom/default.nix
Default email fa5436e0a7 Project import generated by Copybara.
GitOrigin-RevId: e8057b67ebf307f01bdcc8fba94d94f75039d1f6
2024-06-05 17:53:02 +02:00

60 lines
1.2 KiB
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
pyyaml,
semantic-version,
defusedxml,
pytestCheckHook,
}:
buildPythonPackage rec {
pname = "lib4sbom";
version = "0.7.1";
format = "setuptools";
src = fetchFromGitHub {
owner = "anthonyharrison";
repo = pname;
rev = "v${version}";
hash = "sha256-UQZZYTRDbUqSH6F8hjhp9L70025cRO3zXQ8Aoznotg4=";
};
dependencies = [
pyyaml
semantic-version
defusedxml
];
nativeCheckInputs = [ pytestCheckHook ];
disabledTests = [
# stub tests that always fail
"TestCycloneDXGenerator"
"TestCcycloneDX_parser"
"TestGenerator"
"TestOutput"
"TestParser"
"TestSPDX_Generator"
"TestSPDX_Parser"
# tests with missing getters
"test_set_downloadlocation"
"test_set_homepage"
"test_set_checksum"
"test_set_externalreference"
# checks for invalid return type
"test_set_type"
# wrong capilatization
"test_set_supplier"
"test_set_originator"
];
pythonImportsCheck = [ "lib4sbom" ];
meta = with lib; {
description = "Library to ingest and generate SBOMs";
homepage = "https://github.com/anthonyharrison/lib4sbom";
license = licenses.asl20;
maintainers = with maintainers; [ teatwig ];
};
}