mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-28 08:33:54 +00:00
36 lines
865 B
Nix
36 lines
865 B
Nix
{ lib, fetchFromGitHub, buildGoModule, testers, temporal-cli }:
|
|
|
|
buildGoModule rec {
|
|
pname = "temporal-cli";
|
|
version = "1.17.1";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "temporalio";
|
|
repo = "tctl";
|
|
rev = "v${version}";
|
|
sha256 = "sha256-rdDtgSM2wZsHYv9tBNdcSHYXdvvEk5wqdLr1KjoPz1E=";
|
|
};
|
|
|
|
vendorSha256 = "sha256-9bgovXVj+qddfDSI4DTaNYH4H8Uc4DZqeVYG5TWXTNw=";
|
|
|
|
ldflags = [ "-s" "-w" ];
|
|
|
|
preCheck = ''
|
|
export HOME=$(mktemp -d)
|
|
'';
|
|
|
|
passthru.tests.version = testers.testVersion {
|
|
package = temporal-cli;
|
|
# the app writes a default config file at startup
|
|
command = "HOME=$(mktemp -d) ${meta.mainProgram} --version";
|
|
};
|
|
|
|
meta = with lib; {
|
|
description = "Temporal CLI";
|
|
homepage = "https://temporal.io";
|
|
license = licenses.mit;
|
|
maintainers = with maintainers; [ aaronjheng ];
|
|
mainProgram = "tctl";
|
|
};
|
|
}
|