at 23.11-beta 46 lines 1.1 kB view raw
1{ lib 2, buildGoModule 3, fetchFromGitHub 4, installShellFiles 5}: 6 7buildGoModule rec { 8 pname = "hostctl"; 9 version = "1.1.4"; 10 11 src = fetchFromGitHub { 12 owner = "guumaster"; 13 repo = pname; 14 rev = "v${version}"; 15 hash = "sha256-9BbPHqAZKw8Rpjpdd/e9ip3V0Eh06tEFt/skQ97ij4g="; 16 }; 17 18 vendorHash = "sha256-+p1gIqklTyd/AU1q0zbQN4BwxOM910fBFmkqvbFAbZA="; 19 20 nativeBuildInputs = [ 21 installShellFiles 22 ]; 23 24 ldflags = [ 25 "-s" 26 "-w" 27 "-X github.com/guumaster/hostctl/cmd/hostctl/actions.version=${version}" 28 ]; 29 30 postInstall = '' 31 installShellCompletion --cmd hostctl \ 32 --bash <($out/bin/hostctl completion bash) \ 33 --zsh <($out/bin/hostctl completion zsh) 34 ''; 35 36 meta = with lib; { 37 description = "CLI tool to manage the /etc/hosts file"; 38 longDescription = '' 39 This tool gives you more control over the use of your hosts file. 40 You can have multiple profiles and switch them on/off as you need. 41 ''; 42 homepage = "https://guumaster.github.io/hostctl/"; 43 license = licenses.mit; 44 maintainers = with maintainers; [ blaggacao ]; 45 }; 46}