Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 python3Packages, 4 fetchFromGitHub, 5 sbom2dot, 6 sbom4files, 7 versionCheckHook, 8}: 9 10python3Packages.buildPythonApplication rec { 11 pname = "sbom4python"; 12 version = "0.12.4"; 13 pyproject = true; 14 15 src = fetchFromGitHub { 16 owner = "anthonyharrison"; 17 repo = "sbom4python"; 18 tag = "v${version}"; 19 hash = "sha256-eiizZEc5OIBfyGlSCer2zcrEFd2qpxmMjxV8e9W3gdk="; 20 }; 21 22 build-system = with python3Packages; [ 23 setuptools 24 ]; 25 26 dependencies = with python3Packages; [ 27 importlib-metadata 28 lib4package 29 lib4sbom 30 sbom2dot 31 sbom4files 32 setuptools # for pkg_resources 33 toml 34 ]; 35 36 nativeCheckInputs = [ 37 versionCheckHook 38 ]; 39 versionCheckProgramArg = "--version"; 40 41 pythonImportsCheck = [ 42 "sbom4python" 43 ]; 44 45 meta = { 46 changelog = "https://github.com/anthonyharrison/sbom4python/releases/tag/${src.tag}"; 47 description = "Tool to generate a SBOM (Software Bill of Materials) for an installed Python module"; 48 homepage = "https://github.com/anthonyharrison/sbom4python"; 49 license = lib.licenses.asl20; 50 mainProgram = "sbom4python"; 51 maintainers = with lib.maintainers; [ drupol ]; 52 }; 53}