depot/third_party/nixpkgs/pkgs/tools/security/osv-scanner/default.nix
Default email 472aeafc57 Project import generated by Copybara.
GitOrigin-RevId: c31898adf5a8ed202ce5bea9f347b1c6871f32d1
2024-10-04 18:56:33 +02:00

48 lines
1.2 KiB
Nix

{ lib
, buildGoModule
, fetchFromGitHub
, testers
, osv-scanner
}:
buildGoModule rec {
pname = "osv-scanner";
version = "1.9.0";
src = fetchFromGitHub {
owner = "google";
repo = "osv-scanner";
rev = "refs/tags/v${version}";
hash = "sha256-hK8hvD59X+JzeBtYqwlfNBy2XX7slzMKoIHxL8DmRGc=";
};
vendorHash = "sha256-IVtdZCwjGrGr0DuyPCkt5DJQhD8mN7bEFI41e0a3s8s=";
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 ];
};
}