Files
nixpkgs/pkgs/by-name/yt/ytt/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.4 KiB
Nix

{
lib,
stdenv,
buildGoModule,
fetchFromGitHub,
installShellFiles,
testers,
ytt,
}:
buildGoModule rec {
pname = "ytt";
version = "0.52.1";
src = fetchFromGitHub {
owner = "carvel-dev";
repo = "ytt";
rev = "v${version}";
sha256 = "sha256-fSrvsRZpXXvR6SpEigEMiP0lU5y+ddidHwtz+rmgSb4=";
};
vendorHash = null;
nativeBuildInputs = [ installShellFiles ];
ldflags = [
"-s"
"-w"
"-X carvel.dev/ytt/pkg/version.Version=${version}"
];
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
installShellCompletion --cmd ytt \
--bash <($out/bin/ytt completion bash) \
--fish <($out/bin/ytt completion fish) \
--zsh <($out/bin/ytt completion zsh)
'';
# Once `__structuredArgs` is introduced, integrate checks and
# set some regexes `checkFlags = [ "-skip=TestDataValues.*" ]`
# etc. So far we dont test because passing '*' chars through the Go builder
# is flawed.
doCheck = false;
passthru.tests.version = testers.testVersion {
package = ytt;
command = "ytt --version";
inherit version;
};
meta = with lib; {
description = "YAML templating tool that allows configuration of complex software via reusable templates with user-provided values";
mainProgram = "ytt";
homepage = "https://get-ytt.io";
license = licenses.asl20;
maintainers = with maintainers; [
brodes
techknowlogick
gabyx
];
};
}