depot/third_party/nixpkgs/pkgs/tools/security/osv-scanner/default.nix
Default email 23b612e36f Project import generated by Copybara.
GitOrigin-RevId: ae5c332cbb5827f6b1f02572496b141021de335f
2024-01-25 23:12:00 +09:00

46 lines
1.1 KiB
Nix

{ lib
, buildGoModule
, fetchFromGitHub
, testers
, osv-scanner
}:
buildGoModule rec {
pname = "osv-scanner";
version = "1.6.1";
src = fetchFromGitHub {
owner = "google";
repo = pname;
rev = "v${version}";
hash = "sha256-ddzdOk2sHNzjCM4cLJY+H9h13MjamlC1RYcnOcDGV4M=";
};
vendorHash = "sha256-9cE4UcQipJYwQDZA4jlcV68BBTgft7oRVlngg/PAmWI=";
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";
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 ];
};
}