Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
55 lines
1.2 KiB
Nix
55 lines
1.2 KiB
Nix
{
|
|
lib,
|
|
buildGo124Module,
|
|
fetchFromGitHub,
|
|
versionCheckHook,
|
|
}:
|
|
|
|
buildGo124Module rec {
|
|
pname = "criticality-score";
|
|
version = "2.0.4";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "ossf";
|
|
repo = "criticality_score";
|
|
tag = "v${version}";
|
|
hash = "sha256-p2ZXNpPFwIKPWDKCdEUZQvt/hvLQS9xjZaaquNTaUB0=";
|
|
};
|
|
|
|
proxyVendor = true;
|
|
|
|
vendorHash = "sha256-mKCwyAE/fI9ateKcrTLDAdULbT6pUpV0cMZ0X5bqT1M=";
|
|
|
|
ldflags = [
|
|
"-s"
|
|
"-w"
|
|
"-X=main.version=${version}"
|
|
"-X=main.commit=${src.tag}"
|
|
"-X=main.date=1970-01-01T00:00:00Z"
|
|
];
|
|
|
|
subPackages = [
|
|
"cmd/collect_signals"
|
|
"cmd/criticality_score"
|
|
"cmd/csv_transfer"
|
|
"cmd/enumerate_github"
|
|
"cmd/scorer"
|
|
];
|
|
|
|
doInstallCheck = true;
|
|
|
|
nativeInstallCheckInputs = [ versionCheckHook ];
|
|
|
|
versionCheckProgram = "${placeholder "out"}/bin/${meta.mainProgram}";
|
|
versionCheckProgramArg = "--version";
|
|
|
|
meta = {
|
|
description = "Gives criticality score for an open source project";
|
|
homepage = "https://github.com/ossf/criticality_score";
|
|
changelog = "https://github.com/ossf/criticality_score/releases/tag/v${version}";
|
|
license = lib.licenses.asl20;
|
|
maintainers = with lib.maintainers; [ wamserma ];
|
|
mainProgram = "criticality_score";
|
|
};
|
|
}
|