at 23.11-beta 50 lines 1.3 kB view raw
1{ lib, buildGoModule, fetchFromGitHub, pkg-config, btrfs-progs, lvm2 }: 2 3buildGoModule rec { 4 pname = "dockle"; 5 version = "0.4.13"; 6 7 src = fetchFromGitHub { 8 owner = "goodwithtech"; 9 repo = pname; 10 rev = "v${version}"; 11 hash = "sha256-45VRA3IBGlbMoRbAh6F+KuAM5CIlU00ZzG7N62aikGE="; 12 }; 13 14 vendorHash = "sha256-t66SRFDJT32dwRFqborir+mSQJlpekbicDNhmkeqork="; 15 16 nativeBuildInputs = [ pkg-config ]; 17 buildInputs = [ btrfs-progs lvm2 ]; 18 19 ldflags = [ 20 "-s" 21 "-w" 22 "-X github.com/goodwithtech/dockle/pkg.version=${version}" 23 ]; 24 25 preCheck = '' 26 # Remove tests that use networking 27 rm pkg/scanner/scan_test.go 28 ''; 29 30 doInstallCheck = true; 31 installCheckPhase = '' 32 runHook preInstallCheck 33 $out/bin/dockle --help 34 $out/bin/dockle --version | grep "dockle version ${version}" 35 runHook postInstallCheck 36 ''; 37 38 meta = with lib; { 39 homepage = "https://containers.goodwith.tech"; 40 changelog = "https://github.com/goodwithtech/dockle/releases/tag/v${version}"; 41 description = "Container Image Linter for Security"; 42 longDescription = '' 43 Container Image Linter for Security. 44 Helping build the Best-Practice Docker Image. 45 Easy to start. 46 ''; 47 license = licenses.asl20; 48 maintainers = with maintainers; [ jk ]; 49 }; 50}