12 src = fetchFromGitHub {
13 owner = "aquasecurity";
16 hash = "sha256-eBAOrIGlAJ7r9UviCZUELG5p3k08OqvFUGZ8Ovnxsis=";
17 # populate values that require us to use git. By doing this in postFetch we
18 # can delete .git afterwards and maintain better reproducibility of the src.
22 git rev-parse HEAD > $out/COMMIT
23 # 0000-00-00T00:00:00Z
24 date -u -d "@$(git log -1 --pretty=%ct)" "+%Y-%m-%dT%H:%M:%SZ" > $out/SOURCE_DATE_EPOCH
25 find "$out" -name .git -print0 | xargs -0 rm -rf
28 vendorHash = "sha256-meZMuo+3Qv95TYYDslMpdfFG0KAbY/tufjcT7HgZB2c=";
30 nativeBuildInputs = [ installShellFiles ];
32 subPackages = [ "cmd/starboard" ];
37 "-X main.version=v${version}"
40 # ldflags based on metadata from git and source
42 ldflags+=" -X main.gitCommit=$(cat COMMIT)"
43 ldflags+=" -X main.buildDate=$(cat SOURCE_DATE_EPOCH)"
47 # Remove test that requires networking
48 rm pkg/plugin/aqua/client/client_integration_test.go
50 # Feed in all but the integration tests for testing
51 # This is because subPackages above limits what is built to just what we
52 # want but also limits the tests
54 go list ./... | grep -v itest
59 installShellCompletion --cmd starboard \
60 --bash <($out/bin/starboard completion bash) \
61 --fish <($out/bin/starboard completion fish) \
62 --zsh <($out/bin/starboard completion zsh)
65 doInstallCheck = true;
66 installCheckPhase = ''
67 runHook preInstallCheck
68 $out/bin/starboard --help
69 $out/bin/starboard version | grep "v${version}"
70 runHook postInstallCheck
74 homepage = "https://github.com/aquasecurity/starboard";
75 changelog = "https://github.com/aquasecurity/starboard/releases/tag/v${version}";
76 description = "Kubernetes-native security tool kit";
77 mainProgram = "starboard";
79 Starboard integrates security tools into the Kubernetes environment, so
80 that users can find and view the risks that relate to different resources
81 in a Kubernetes-native way. Starboard provides custom security resources
82 definitions and a Go module to work with a range of existing security
83 tools, as well as a kubectl-compatible command-line tool and an Octant
84 plug-in that make security reports available through familiar Kubernetes
87 license = licenses.asl20;
88 maintainers = with maintainers; [ jk ];