mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-22 21:53:32 +00:00
49 lines
1.2 KiB
Nix
49 lines
1.2 KiB
Nix
{ lib, buildGoModule, fetchFromGitHub, pkg-config, btrfs-progs, lvm2 }:
|
|
|
|
buildGoModule rec {
|
|
pname = "dockle";
|
|
version = "0.4.2";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "goodwithtech";
|
|
repo = pname;
|
|
rev = "v${version}";
|
|
sha256 = "sha256-H+qJBwKh+jh5ECMPbPgGtXzF+mm73ut0+URqpNBc3SM=";
|
|
};
|
|
|
|
vendorSha256 = "sha256-klTIGmMKA6gp1strgvKnVBtYGQu2407UwxZ8brdGEkQ=";
|
|
|
|
nativeBuildInputs = [ pkg-config ];
|
|
buildInputs = [ btrfs-progs lvm2 ];
|
|
|
|
ldflags = [
|
|
"-s" "-w" "-X main.version=${version}"
|
|
];
|
|
|
|
preCheck = ''
|
|
# Remove tests that use networking
|
|
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
|
|
'';
|
|
|
|
meta = with lib; {
|
|
homepage = "https://containers.goodwith.tech";
|
|
changelog = "https://github.com/goodwithtech/dockle/releases/tag/v${version}";
|
|
description = "Container Image Linter for Security";
|
|
longDescription = ''
|
|
Container Image Linter for Security.
|
|
Helping build the Best-Practice Docker Image.
|
|
Easy to start.
|
|
'';
|
|
license = licenses.asl20;
|
|
maintainers = with maintainers; [ jk ];
|
|
};
|
|
}
|