e7ec2969af
GitOrigin-RevId: 9b19f5e77dd906cb52dade0b7bd280339d2a1f3d
46 lines
1.1 KiB
Nix
46 lines
1.1 KiB
Nix
{ lib
|
|
, buildGoModule
|
|
, fetchFromGitHub
|
|
, testers
|
|
, osv-scanner
|
|
}:
|
|
buildGoModule rec {
|
|
pname = "osv-scanner";
|
|
version = "1.5.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "google";
|
|
repo = pname;
|
|
rev = "v${version}";
|
|
hash = "sha256-wWycONThNIqiSbpsopsc9AbAxOToWkTiNzkJ2I8Z0t4=";
|
|
};
|
|
|
|
vendorHash = "sha256-CiRvryjBp3nUrPRxNqM88p4856yT+BuIsjvYuE+DmqI=";
|
|
|
|
subPackages = [
|
|
"cmd/osv-scanner"
|
|
];
|
|
|
|
ldflags = [
|
|
"-s"
|
|
"-w"
|
|
"-X main.version=${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";
|
|
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 ];
|
|
};
|
|
}
|