587713944a
GitOrigin-RevId: 6143fc5eeb9c4f00163267708e26191d1e918932
48 lines
1.2 KiB
Nix
48 lines
1.2 KiB
Nix
{ lib
|
|
, buildGoModule
|
|
, fetchFromGitHub
|
|
, testers
|
|
, osv-scanner
|
|
}:
|
|
|
|
buildGoModule rec {
|
|
pname = "osv-scanner";
|
|
version = "1.7.2";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "google";
|
|
repo = "osv-scanner";
|
|
rev = "refs/tags/v${version}";
|
|
hash = "sha256-UE6iCvv/ByODZX+FoLvIw+EeyISWFkHb4xK5L33w1hU=";
|
|
};
|
|
|
|
vendorHash = "sha256-c/Wjhpa7upSRMaU+rheGF9dbvK0MQe3ZmPLpR5bRiUI=";
|
|
|
|
subPackages = [
|
|
"cmd/osv-scanner"
|
|
];
|
|
|
|
ldflags = [
|
|
"-s"
|
|
"-w"
|
|
"-X=github.com/google/osv-scanner/internal/version.OSVVersion=${version}"
|
|
"-X=main.commit=n/a"
|
|
"-X=main.date=1970-01-01T00:00:00Z"
|
|
];
|
|
|
|
# Tests require network connectivity to query https://api.osv.dev.
|
|
doCheck = false;
|
|
|
|
passthru.tests.version = testers.testVersion {
|
|
package = osv-scanner;
|
|
};
|
|
|
|
meta = with lib; {
|
|
description = "Vulnerability scanner written in Go which uses the data provided by https://osv.dev";
|
|
mainProgram = "osv-scanner";
|
|
homepage = "https://github.com/google/osv-scanner";
|
|
changelog = "https://github.com/google/osv-scanner/releases/tag/v${version}";
|
|
license = licenses.asl20;
|
|
maintainers = with maintainers; [ stehessel urandom ];
|
|
};
|
|
}
|