Files
nixpkgs/pkgs/development/python-modules/lib4sbom/default.nix
T
Ihar Hrachyshka 567e8dfd8e treewide: clean up 'meta = with' pattern
This commit was created by a combination of scripts and tools:
- an ast-grep script to prefix things in meta with `lib.`,
- a modified nixf-diagnose / nixf combination to remove unused `with
lib;`, and
- regular nixfmt.

Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
2025-12-10 18:09:49 +01:00

71 lines
1.5 KiB
Nix

{
lib,
buildPythonPackage,
defusedxml,
fastjsonschema,
fetchFromGitHub,
jsonschema,
pytestCheckHook,
pyyaml,
semantic-version,
setuptools,
xmlschema,
}:
buildPythonPackage rec {
pname = "lib4sbom";
version = "0.9.1";
pyproject = true;
src = fetchFromGitHub {
owner = "anthonyharrison";
repo = "lib4sbom";
tag = "v${version}";
hash = "sha256-GYXkxnZU7QYczKbJUiU+8TmboZQG9nkg00S1IRXeK6c=";
};
build-system = [ setuptools ];
dependencies = [
defusedxml
fastjsonschema
jsonschema
pyyaml
semantic-version
xmlschema
];
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 = {
description = "Library to ingest and generate SBOMs";
homepage = "https://github.com/anthonyharrison/lib4sbom";
changelog = "https://github.com/anthonyharrison/lib4sbom/releases/tag/${src.tag}";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ teatwig ];
};
}