@@ -0,0 +1,43 @@
1+{ lib, buildGoModule, fetchFromGitHub, pkg-config, btrfs-progs, lvm2 }:
2+
3+buildGoModule rec {
4+ pname = "dockle";
5+ version = "0.3.1";
6+
7+ src = fetchFromGitHub {
8+ owner = "goodwithtech";
9+ repo = pname;
10+ rev = "v${version}";
11+ sha256 = "sha256-Zc2ZlyeWdRvyuJLDDTONfh0/q+HKR4lNtSFMjgJWrRY=";
12+ };
13+
14+ vendorSha256 = "sha256-4IJKXcnMXBqoEjsV4Xg2QYvKwxDDUjcZtrj9IRuT6i4=";
15+
16+ nativeBuildInputs = [ pkg-config ];
17+ buildInputs = [ btrfs-progs lvm2 ];
18+
19+ buildFlagsArray = [
20+ "-ldflags="
21+ "-s"
22+ "-w"
23+ "-X main.version=${version}"
24+ ];
25+
26+ preCheck = ''
27+ # Remove tests that use networking
28+ rm pkg/scanner/scan_test.go pkg/utils/fetch_test.go
29+ '';
30+
31+ meta = with lib; {
32+ homepage = "https://containers.goodwith.tech";
33+ changelog = "https://github.com/goodwithtech/dockle/releases/tag/v${version}";
34+ description = "Container Image Linter for Security";
35+ longDescription = ''
36+ Container Image Linter for Security.
37+ Helping build the Best-Practice Docker Image.
38+ Easy to start.
39+ '';
40+ license = licenses.asl20;
41+ maintainers = with maintainers; [ jk ];
42+ };
43+}