2023-07-15 17:15:38 +00:00
|
|
|
{ lib
|
|
|
|
, buildGoModule
|
|
|
|
, fetchFromGitHub
|
|
|
|
, installShellFiles
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "tyson";
|
|
|
|
version = "0.1.1";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "jetpack-io";
|
|
|
|
repo = "tyson";
|
|
|
|
rev = "v${version}";
|
|
|
|
hash = "sha256-c4ROLn+BSX7v/4C9/IeU6HiE2YvnqDuXXGp2iZhAVk4=";
|
|
|
|
};
|
|
|
|
|
|
|
|
vendorHash = "sha256-NhDv7oH8LK/vebwjs55tsCCWVhbZZd15z5ewOF5z9+Y=";
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
installShellFiles
|
|
|
|
];
|
|
|
|
|
|
|
|
ldflags = [ "-s" "-w" ];
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
installShellCompletion --cmd tyson \
|
|
|
|
--bash <($out/bin/tyson completion bash) \
|
|
|
|
--fish <($out/bin/tyson completion fish) \
|
|
|
|
--zsh <($out/bin/tyson completion zsh)
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "TypeScript as a configuration language";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "tyson";
|
2023-07-15 17:15:38 +00:00
|
|
|
homepage = "https://github.com/jetpack-io/tyson";
|
|
|
|
changelog = "https://github.com/jetpack-io/tyson/releases/tag/${src.rev}";
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ figsoda ];
|
|
|
|
};
|
|
|
|
}
|