Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at netboot-syslinux-multiplatform 44 lines 1.3 kB view raw
1{ lib, buildGoModule, fetchFromGitHub, installShellFiles, testers, kube-linter }: 2 3buildGoModule rec { 4 pname = "kube-linter"; 5 version = "0.6.4"; 6 7 src = fetchFromGitHub { 8 owner = "stackrox"; 9 repo = pname; 10 rev = "v${version}"; 11 sha256 = "sha256-L0JjbjV5KwI4qas8iLp5OLkleQlD29jsYLpe3ER1l2Y="; 12 }; 13 14 vendorHash = "sha256-1erG3TFv3DR6SLDIrmRefAPjXhgXEVYFiAsUPiI7kX4="; 15 16 ldflags = [ 17 "-s" "-w" "-X golang.stackrox.io/kube-linter/internal/version.version=${version}" 18 ]; 19 20 nativeBuildInputs = [ installShellFiles ]; 21 22 checkFlags = [ "-skip=TestCreateContextsWithIgnorePaths" ]; 23 24 postInstall = '' 25 installShellCompletion --cmd kube-linter \ 26 --bash <($out/bin/kube-linter completion bash) \ 27 --fish <($out/bin/kube-linter completion fish) \ 28 --zsh <($out/bin/kube-linter completion zsh) 29 ''; 30 31 passthru.tests.version = testers.testVersion { 32 package = kube-linter; 33 command = "kube-linter version"; 34 }; 35 36 meta = with lib; { 37 description = "A static analysis tool that checks Kubernetes YAML files and Helm charts"; 38 homepage = "https://kubelinter.io"; 39 changelog = "https://github.com/stackrox/kube-linter/releases/tag/v${version}"; 40 license = licenses.asl20; 41 maintainers = with maintainers; [ mtesseract stehessel Intuinewin ]; 42 platforms = platforms.all; 43 }; 44}