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
62 lines
1.4 KiB
Nix
62 lines
1.4 KiB
Nix
{
|
|
stdenv,
|
|
buildGoModule,
|
|
fetchFromGitHub,
|
|
installShellFiles,
|
|
lib,
|
|
tenv,
|
|
testers,
|
|
}:
|
|
|
|
buildGoModule rec {
|
|
pname = "tenv";
|
|
version = "4.7.21";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "tofuutils";
|
|
repo = "tenv";
|
|
tag = "v${version}";
|
|
hash = "sha256-u7Whu2Y9MAGmEOnQECb0B/VMW6ZCflAANQxan+CrnAw=";
|
|
};
|
|
|
|
vendorHash = "sha256-Jt0GDrYay6ZbMsayO5BFO2psK6BHwL/4AyEi8SqxZ4E=";
|
|
|
|
excludedPackages = [ "tools" ];
|
|
|
|
# Tests disabled for requiring network access to release.hashicorp.com
|
|
doCheck = false;
|
|
|
|
ldflags = [
|
|
"-s"
|
|
"-w"
|
|
"-X main.version=v${version}"
|
|
];
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
|
installShellCompletion --cmd tenv \
|
|
--zsh <($out/bin/tenv completion zsh) \
|
|
--bash <($out/bin/tenv completion bash) \
|
|
--fish <($out/bin/tenv completion fish)
|
|
'';
|
|
|
|
passthru.tests.version = testers.testVersion {
|
|
command = "HOME=$TMPDIR tenv --version";
|
|
package = tenv;
|
|
version = "v${version}";
|
|
};
|
|
|
|
meta = {
|
|
changelog = "https://github.com/tofuutils/tenv/releases/tag/v${version}";
|
|
description = "OpenTofu, Terraform, Terragrunt and Atmos version manager written in Go";
|
|
homepage = "https://tofuutils.github.io/tenv";
|
|
license = lib.licenses.asl20;
|
|
maintainers = with lib.maintainers; [
|
|
rmgpinto
|
|
nmishin
|
|
kvendingoldo
|
|
];
|
|
};
|
|
}
|