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
65 lines
1.6 KiB
Nix
65 lines
1.6 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
buildGoModule,
|
|
fetchFromGitHub,
|
|
installShellFiles,
|
|
testers,
|
|
datree,
|
|
}:
|
|
|
|
buildGoModule rec {
|
|
pname = "datree";
|
|
version = "1.9.19";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "datreeio";
|
|
repo = "datree";
|
|
tag = version;
|
|
hash = "sha256-W1eX7eUMdPGbHA/f08xkG2EUeZmaunEAQn7/LRBe2nk=";
|
|
};
|
|
|
|
vendorHash = "sha256-+PQhuIO4KjXtW/ZcS0OamuOHzK7ZL+nwOBxeCRoXuKE=";
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
ldflags = [
|
|
"-s"
|
|
"-w"
|
|
"-X github.com/datreeio/datree/cmd.CliVersion=${version}"
|
|
];
|
|
|
|
tags = [ "main" ];
|
|
|
|
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
|
installShellCompletion \
|
|
--cmd datree \
|
|
--bash <($out/bin/datree completion bash) \
|
|
--fish <($out/bin/datree completion fish) \
|
|
--zsh <($out/bin/datree completion zsh)
|
|
'';
|
|
|
|
passthru.tests.version = testers.testVersion {
|
|
package = datree;
|
|
command = "datree version";
|
|
};
|
|
|
|
meta = {
|
|
description = "CLI tool to ensure K8s manifests and Helm charts follow best practices";
|
|
mainProgram = "datree";
|
|
longDescription = ''
|
|
Datree provides an E2E policy enforcement solution to run automatic checks
|
|
for rule violations. Datree can be used on the command line, admission
|
|
webhook, or even as a kubectl plugin to run policies against Kubernetes
|
|
objects.
|
|
'';
|
|
homepage = "https://datree.io/";
|
|
changelog = "https://github.com/datreeio/datree/releases/tag/${version}";
|
|
license = lib.licenses.asl20;
|
|
maintainers = with lib.maintainers; [
|
|
azahi
|
|
jceb
|
|
];
|
|
};
|
|
}
|