mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-04 12:53:05 +00:00
43 lines
1.0 KiB
Nix
43 lines
1.0 KiB
Nix
{ lib
|
|
, buildGoModule
|
|
, fetchFromGitHub
|
|
, testers
|
|
, osv-scanner
|
|
}:
|
|
buildGoModule rec {
|
|
pname = "osv-scanner";
|
|
version = "1.1.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "google";
|
|
repo = pname;
|
|
rev = "v${version}";
|
|
hash = "sha256-wU42911t4L2tsVBdmNnc1ABu3zEv94SRi9Z0/8zfUJs=";
|
|
};
|
|
|
|
vendorHash = "sha256-8z/oRR2ru4SNdxgqelAQGmAPvOEvh9jlLl17k7Cv20g=";
|
|
|
|
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 ];
|
|
};
|
|
}
|