Skip to content

Commit ae01350

Browse files
authored
Merge pull request #100048 from xoe-labs/da-package-hostctl
hostctl: init at 1.0.14
2 parents 8c9bb91 + b016ae0 commit ae01350

File tree

2 files changed

+38
-0
lines changed

2 files changed

+38
-0
lines changed
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
{ buildGoModule, fetchFromGitHub, lib, installShellFiles }:
2+
3+
buildGoModule rec {
4+
pname = "hostctl";
5+
version = "1.0.14";
6+
7+
src = fetchFromGitHub {
8+
owner = "guumaster";
9+
repo = pname;
10+
rev = "v${version}";
11+
sha256 = "02bjii97l4fy43v2rb93m9b0ad8y6mjvbvp4sz6a5n0w9dm1z1q9";
12+
};
13+
14+
vendorSha256 = "1lqk3cda0frqp2vwkqa4b3xkdw814wgkbr7g9r2mwxn85fpdcq5c";
15+
16+
buildFlagsArray = [ "-ldflags=-s -w -X github.com/guumaster/hostctl/cmd/hostctl/actions.version=${version}" ];
17+
18+
nativeBuildInputs = [ installShellFiles ];
19+
postInstall = ''
20+
installShellCompletion --cmd hostctl \
21+
--bash <($out/bin/hostctl completion bash) \
22+
--zsh <($out/bin/hostctl completion zsh)
23+
'';
24+
25+
meta = with lib; {
26+
description = "Your dev tool to manage /etc/hosts like a pro!";
27+
longDescription = ''
28+
This tool gives you more control over the use of your hosts file.
29+
You can have multiple profiles and switch them on/off as you need.
30+
'';
31+
homepage = "https://guumaster.github.io/hostctl/";
32+
license = licenses.mit;
33+
maintainers = with maintainers; [ blaggacao ];
34+
};
35+
}
36+

pkgs/top-level/all-packages.nix

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1108,6 +1108,8 @@ in
11081108

11091109
hime = callPackage ../tools/inputmethods/hime {};
11101110

1111+
hostctl = callPackage ../tools/system/hostctl { };
1112+
11111113
hpe-ltfs = callPackage ../tools/backup/hpe-ltfs { };
11121114

11131115
http2tcp = callPackage ../tools/networking/http2tcp { };

0 commit comments

Comments
 (0)