nixpkgs/pkgs/development/tools/twitch-cli/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

50 lines
1,011 B
Nix
Raw Normal View History

2022-11-24 11:55:40 +01:00
{ buildGoModule
, fetchFromGitHub
, lib
, testers
, twitch-cli
}:
buildGoModule rec {
pname = "twitch-cli";
2023-12-24 18:33:29 +01:00
version = "1.1.22";
2022-11-24 11:55:40 +01:00
src = fetchFromGitHub {
owner = "twitchdev";
repo = pname;
rev = "v${version}";
2023-12-24 18:33:29 +01:00
hash = "sha256-9tbU9gR8UHg98UKZ9ganapAz1bar18xb7ISvKoeuwe4=";
2022-11-24 11:55:40 +01:00
};
patches = [
./application-name.patch
];
2023-10-21 18:08:06 +02:00
vendorHash = "sha256-1uUokMeI0D/apDFJLq+Go5BQp1JMYxJQF8nKvw52E7o=";
2022-11-24 11:55:40 +01: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; {
description = "The official Twitch CLI to make developing on Twitch easier";
homepage = "https://github.com/twitchdev/twitch-cli";
license = licenses.asl20;
maintainers = with maintainers; [ benediktbroich ];
};
}