Unverified Commit 6eec6bbb authored by Pol Dellaiera's avatar Pol Dellaiera Committed by GitHub
Browse files

sbom4python: init at 0.12.1 (#378227)

parents cc9ef6aa 0d1c991c
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
{
  python3Packages,
}:

(python3Packages.toPythonApplication python3Packages.sbom2dot).overrideAttrs (previousAttrs: {
  meta.mainProgram = "sbom2dot";
})
+7 −0
Original line number Diff line number Diff line
{
  python3Packages,
}:

(python3Packages.toPythonApplication python3Packages.sbom4files).overrideAttrs (previousAttrs: {
  meta.mainProgram = "sbom4files";
})
+53 −0
Original line number Diff line number Diff line
{
  lib,
  python3Packages,
  fetchFromGitHub,
  sbom2dot,
  sbom4files,
  versionCheckHook,
}:

python3Packages.buildPythonApplication rec {
  pname = "sbom4python";
  version = "0.12.1";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "anthonyharrison";
    repo = "sbom4python";
    tag = "v${version}";
    hash = "sha256-tp5sg3Z3tczWxfYQcpeKMlin1s7PGUqjG3h4ZsAfKHs=";
  };

  build-system = with python3Packages; [
    setuptools
  ];

  dependencies = with python3Packages; [
    importlib-metadata
    lib4package
    lib4sbom
    sbom2dot
    sbom4files
    setuptools # for pkg_resources
    toml
  ];

  nativeCheckInputs = [
    versionCheckHook
  ];
  versionCheckProgramArg = [ "--version" ];

  pythonImportsCheck = [
    "sbom4python"
  ];

  meta = {
    changelog = "https://github.com/anthonyharrison/sbom4python/releases/tag/v${version}";
    description = "A tool to generate a SBOM (Software Bill of Materials) for an installed Python module";
    homepage = "https://github.com/anthonyharrison/sbom4python";
    license = lib.licenses.asl20;
    mainProgram = "sbom4python";
    maintainers = with lib.maintainers; [ drupol ];
  };
}
+40 −0
Original line number Diff line number Diff line
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  setuptools,
  requests,
}:

buildPythonPackage rec {
  pname = "lib4package";
  version = "0.3.1";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "anthonyharrison";
    repo = "lib4package";
    tag = "v${version}";
    hash = "sha256-ZU5Lne2/xBgaFrTumWpZsuL9ckqdACrb0iRraWo+Rk0=";
  };

  build-system = [
    setuptools
  ];

  dependencies = [
    requests
  ];

  pythonImportsCheck = [
    "lib4package"
  ];

  meta = {
    changelog = "https://github.com/anthonyharrison/lib4package/releases/tag/v${version}";
    description = "Utility for handling package metadata to include in Software Bill of Materials (SBOMs";
    homepage = "https://github.com/anthonyharrison/lib4package";
    license = lib.licenses.asl20;
    maintainers = with lib.maintainers; [ drupol ];
  };
}
+41 −0
Original line number Diff line number Diff line
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  setuptools,
  lib4sbom,
}:

buildPythonPackage rec {
  pname = "sbom2dot";
  version = "0.3.1";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "anthonyharrison";
    repo = "sbom2dot";
    tag = "v${version}";
    hash = "sha256-xrphhTbIyqe0CqQOpJSyzTWbGYFFOKdyWJTTAlURkoo=";
  };

  build-system = [
    setuptools
  ];

  dependencies = [
    lib4sbom
  ];

  pythonImportsCheck = [
    "sbom2dot"
  ];

  meta = {
    changelog = "https://github.com/anthonyharrison/sbom2dot/releases/tag/v${version}";
    description = "Create a dependency graph of the components within a SBOM";
    homepage = "https://github.com/anthonyharrison/sbom2dot";
    license = lib.licenses.asl20;
    mainProgram = "sbom2dot";
    maintainers = with lib.maintainers; [ drupol ];
  };
}
Loading