1{ lib
2, buildGoModule
3, fetchFromGitHub
4, osv-detector
5, testers
6}:
7
8buildGoModule rec {
9 pname = "osv-detector";
10 version = "0.6.0";
11
12 src = fetchFromGitHub {
13 owner = "G-Rath";
14 repo = pname;
15 rev = "v${version}";
16 hash = "sha256-Y/9q4ZJ4vxDitqrM4hGe49iqLYk4ebhTs4jrD7P8fdw=";
17 };
18
19 vendorSha256 = "sha256-KAxpDQIRrLZIOvfW8wf0CV4Fj6l3W6nNZNCH3ZE6yJc=";
20
21 ldflags = [
22 "-w"
23 "-s"
24 "-X main.version=${version}"
25 ];
26
27 passthru.tests.version = testers.testVersion {
28 package = osv-detector;
29 command = "osv-detector -version";
30 version = "osv-detector ${version} (unknown, commit none)";
31 };
32
33 meta = with lib; {
34 description = "Auditing tool for detecting vulnerabilities";
35 homepage = "https://github.com/G-Rath/osv-detector";
36 changelog = "https://github.com/G-Rath/osv-detector/releases/tag/v${version}";
37 license = licenses.mit;
38 maintainers = with maintainers; [ fab ];
39 };
40}