2021-02-13 14:23:35 +00:00
|
|
|
{ lib, buildGoModule, fetchFromGitHub, pkg-config, btrfs-progs, lvm2 }:
|
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "dockle";
|
2024-02-07 01:22:34 +00:00
|
|
|
version = "0.4.14";
|
2021-02-13 14:23:35 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "goodwithtech";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2024-02-07 01:22:34 +00:00
|
|
|
hash = "sha256-ZAk51juPFSaDQYfzsf7HXigL4aIk8V+tGA9lZqHBOsY=";
|
2021-02-13 14:23:35 +00:00
|
|
|
};
|
|
|
|
|
2024-02-07 01:22:34 +00:00
|
|
|
vendorHash = "sha256-+AtvnplvPWkUwmxfB7rjYcLTQibQsObFT1QRR0FXAe0=";
|
2021-02-13 14:23:35 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [ pkg-config ];
|
|
|
|
buildInputs = [ btrfs-progs lvm2 ];
|
|
|
|
|
2021-08-22 07:53:02 +00:00
|
|
|
ldflags = [
|
2023-07-15 17:15:38 +00:00
|
|
|
"-s"
|
|
|
|
"-w"
|
|
|
|
"-X github.com/goodwithtech/dockle/pkg.version=${version}"
|
2021-08-22 07:53:02 +00:00
|
|
|
];
|
2021-02-13 14:23:35 +00:00
|
|
|
|
|
|
|
preCheck = ''
|
|
|
|
# Remove tests that use networking
|
2021-02-22 21:28:39 +00:00
|
|
|
rm pkg/scanner/scan_test.go
|
|
|
|
'';
|
|
|
|
|
|
|
|
doInstallCheck = true;
|
|
|
|
installCheckPhase = ''
|
|
|
|
runHook preInstallCheck
|
|
|
|
$out/bin/dockle --help
|
|
|
|
$out/bin/dockle --version | grep "dockle version ${version}"
|
|
|
|
runHook postInstallCheck
|
2021-02-13 14:23:35 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://containers.goodwith.tech";
|
|
|
|
changelog = "https://github.com/goodwithtech/dockle/releases/tag/v${version}";
|
|
|
|
description = "Container Image Linter for Security";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "dockle";
|
2021-02-13 14:23:35 +00:00
|
|
|
longDescription = ''
|
|
|
|
Container Image Linter for Security.
|
|
|
|
Helping build the Best-Practice Docker Image.
|
|
|
|
Easy to start.
|
|
|
|
'';
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ jk ];
|
|
|
|
};
|
|
|
|
}
|