2023-07-15 17:15:38 +00:00
|
|
|
{ buildGoModule
|
|
|
|
, fetchFromGitHub
|
|
|
|
, lib
|
|
|
|
, testers
|
|
|
|
, twitch-cli
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "twitch-cli";
|
2024-07-27 06:49:29 +00:00
|
|
|
version = "1.1.24";
|
2023-07-15 17:15:38 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "twitchdev";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2024-07-27 06:49:29 +00:00
|
|
|
hash = "sha256-kRyJl2SxppVGCO/6wrsb8cO+wpBT1nBsyI/JsPRYzMc=";
|
2023-07-15 17:15:38 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
patches = [
|
|
|
|
./application-name.patch
|
|
|
|
];
|
|
|
|
|
2024-07-27 06:49:29 +00:00
|
|
|
vendorHash = "sha256-Z5bWS4oqjkEfOsvBzupKKnF6rJPU0TLVdwxDkIKcBQY=";
|
2023-07-15 17:15:38 +00:00
|
|
|
|
|
|
|
ldflags = [
|
|
|
|
"-s"
|
|
|
|
"-w"
|
|
|
|
"-X=main.buildVersion=${version}"
|
|
|
|
];
|
|
|
|
|
|
|
|
preCheck = ''
|
|
|
|
export HOME=$(mktemp -d)
|
|
|
|
'';
|
|
|
|
|
|
|
|
__darwinAllowLocalNetworking = true;
|
|
|
|
|
|
|
|
passthru.tests.version = testers.testVersion {
|
|
|
|
package = twitch-cli;
|
|
|
|
command = "HOME=$(mktemp -d) ${pname} version";
|
|
|
|
version = "${pname}/${version}";
|
|
|
|
};
|
|
|
|
|
|
|
|
meta = with lib; {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Official Twitch CLI to make developing on Twitch easier";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "twitch-cli";
|
2023-07-15 17:15:38 +00:00
|
|
|
homepage = "https://github.com/twitchdev/twitch-cli";
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ benediktbroich ];
|
|
|
|
};
|
|
|
|
}
|