2023-10-19 13:55:26 +00:00
|
|
|
{ lib
|
|
|
|
, buildGoModule
|
|
|
|
, fetchFromGitHub
|
|
|
|
, testers
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "goodhosts";
|
2024-02-07 01:22:34 +00:00
|
|
|
version = "1.1.2";
|
2023-10-19 13:55:26 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "goodhosts";
|
|
|
|
repo = "cli";
|
|
|
|
rev = "v${version}";
|
2024-02-07 01:22:34 +00:00
|
|
|
hash = "sha256-ZasS7AYGYPV+nzp9JbJC5pD0yQ+ik+QnuL+3qC1uqFk=";
|
2023-10-19 13:55:26 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
ldflags = [
|
|
|
|
"-s -w -X main.version=${version}"
|
|
|
|
];
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
mv $out/bin/cli $out/bin/goodhosts
|
|
|
|
'';
|
|
|
|
|
2024-02-07 01:22:34 +00:00
|
|
|
vendorHash = "sha256-t/pdJWz6rLnBbH8iq9Nqy+E+DD2770UCEcowwStPdqM=";
|
2023-10-19 13:55:26 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "A CLI tool for managing hostfiles";
|
|
|
|
license = licenses.mit;
|
|
|
|
homepage = "https://github.com/goodhosts/cli/tree/main";
|
|
|
|
maintainers = with maintainers; [ schinmai-akamai ];
|
|
|
|
mainProgram = "goodhosts";
|
|
|
|
};
|
|
|
|
}
|