Commit 3917b65f authored by Jamie Magee's avatar Jamie Magee
Browse files

sbom-tool: init at 4.1.0

parent 434576cb
Loading
Loading
Loading
Loading
+1157 −0

File added.

Preview size limit exceeded, changes collapsed.

+54 −0
Original line number Diff line number Diff line
{
  lib,
  buildDotnetModule,
  fetchFromGitHub,
  dotnetCorePackages,
  versionCheckHook,
  nix-update-script,
}:

buildDotnetModule rec {
  pname = "sbom-tool";
  version = "4.1.0";

  src = fetchFromGitHub {
    owner = "microsoft";
    repo = "sbom-tool";
    tag = "v${version}";
    hash = "sha256-U233dQZrIjnriyQiLK/7k14OUvddqX0D6lLox3CO6qg=";
  };

  projectFile = "src/Microsoft.Sbom.Tool/Microsoft.Sbom.Tool.csproj";
  nugetDeps = ./deps.json;

  dotnet-sdk = dotnetCorePackages.sdk_8_0;
  dotnet-runtime = dotnetCorePackages.runtime_8_0;

  dotnetBuildFlags = [
    "-p:MinVerVersionOverride=${version}"
  ];

  dotnetInstallFlags = [
    "--framework"
    "net8.0"
  ];

  executables = [ "Microsoft.Sbom.Tool" ];

  doInstallCheck = true;
  nativeInstallCheckInputs = [ versionCheckHook ];
  versionCheckProgramArg = [ "--version" ];

  passthru = {
    updateScript = nix-update-script { };
  };

  meta = {
    description = "Highly scalable and enterprise ready tool to create SPDX 2.2 and SPDX 3.0 compatible SBOMs for any variety of artifacts";
    homepage = "https://github.com/microsoft/sbom-tool";
    changelog = "https://github.com/microsoft/sbom-tool/releases/tag/v${version}";
    license = lib.licenses.mit;
    maintainers = [ lib.maintainers.jamiemagee ];
    mainProgram = "Microsoft.Sbom.Tool";
  };
}