2020-10-08 22:02:07 +02:00
|
|
|
{ buildGoModule, fetchFromGitHub, lib, installShellFiles }:
|
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "hostctl";
|
2021-08-04 09:05:40 +02:00
|
|
|
version = "1.1.1";
|
2020-10-08 22:02:07 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "guumaster";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2021-08-04 09:05:40 +02:00
|
|
|
sha256 = "sha256-VjFjGvIoymGVVRiZUk/qoq/PTYoklp+Jz89zndX0e5A=";
|
2020-10-08 22:02:07 +02:00
|
|
|
};
|
|
|
|
|
2021-07-20 07:49:23 +02:00
|
|
|
vendorSha256 = "sha256-rGDWrivIdl5FTu/kNR8nAfE2+1hE4cm3uDg7oBobE9M=";
|
2020-10-08 22:02:07 +02:00
|
|
|
|
2021-08-26 08:45:51 +02:00
|
|
|
ldflags = [ "-s" "-w" "-X github.com/guumaster/hostctl/cmd/hostctl/actions.version=${version}" ];
|
2020-10-08 22:02:07 +02:00
|
|
|
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
postInstall = ''
|
|
|
|
installShellCompletion --cmd hostctl \
|
|
|
|
--bash <($out/bin/hostctl completion bash) \
|
|
|
|
--zsh <($out/bin/hostctl completion zsh)
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Your dev tool to manage /etc/hosts like a pro!";
|
|
|
|
longDescription = ''
|
|
|
|
This tool gives you more control over the use of your hosts file.
|
|
|
|
You can have multiple profiles and switch them on/off as you need.
|
|
|
|
'';
|
|
|
|
homepage = "https://guumaster.github.io/hostctl/";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ blaggacao ];
|
|
|
|
};
|
|
|
|
}
|