Files
nixpkgs/pkgs/by-name/do/dockle/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

62 lines
1.3 KiB
Nix

{
lib,
buildGoModule,
fetchFromGitHub,
pkg-config,
btrfs-progs,
lvm2,
}:
buildGoModule rec {
pname = "dockle";
version = "0.4.15";
src = fetchFromGitHub {
owner = "goodwithtech";
repo = "dockle";
rev = "v${version}";
hash = "sha256-YoDgTKhXpN4UVF/+NDFxaEFwMj81RJaqfjr29t1UdLY=";
};
vendorHash = "sha256-RMuTsPgqQoD2pdEaflNOOBZK5R8LbtcBzpAGocG8OGk=";
nativeBuildInputs = [ pkg-config ];
buildInputs = [
btrfs-progs
lvm2
];
ldflags = [
"-s"
"-w"
"-X github.com/goodwithtech/dockle/pkg.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 = {
homepage = "https://containers.goodwith.tech";
changelog = "https://github.com/goodwithtech/dockle/releases/tag/v${version}";
description = "Container Image Linter for Security";
mainProgram = "dockle";
longDescription = ''
Container Image Linter for Security.
Helping build the Best-Practice Docker Image.
Easy to start.
'';
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ jk ];
};
}