2023-11-16 04:20:00 +00:00
|
|
|
{ buildGoModule
|
2022-10-06 18:32:54 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, installShellFiles
|
2024-07-27 06:49:29 +00:00
|
|
|
, nix-update-script
|
2023-11-16 04:20:00 +00:00
|
|
|
, lib
|
2022-10-06 18:32:54 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "doggo";
|
2024-07-27 06:49:29 +00:00
|
|
|
version = "1.0.4";
|
2022-10-06 18:32:54 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "mr-karan";
|
2024-07-27 06:49:29 +00:00
|
|
|
repo = "doggo";
|
2022-10-06 18:32:54 +00:00
|
|
|
rev = "v${version}";
|
2024-07-27 06:49:29 +00:00
|
|
|
hash = "sha256-SD/BcJxoc5Oi8+nAs+CWBEcbgtaohykNlZ14jJvEWew=";
|
2022-10-06 18:32:54 +00:00
|
|
|
};
|
|
|
|
|
2024-07-27 06:49:29 +00:00
|
|
|
vendorHash = "sha256-JIc6/G1hMf8+oIe4OMc+b0th5MCgi5Mwp3AxW4OD1lg=";
|
2022-10-06 18:32:54 +00:00
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
subPackages = [ "cmd/doggo" ];
|
|
|
|
|
|
|
|
ldflags = [
|
2024-07-27 06:49:29 +00:00
|
|
|
"-s"
|
2022-10-06 18:32:54 +00:00
|
|
|
"-X main.buildVersion=v${version}"
|
|
|
|
];
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
installShellCompletion --cmd doggo \
|
2024-07-27 06:49:29 +00:00
|
|
|
--bash <($out/bin/doggo completions bash) \
|
|
|
|
--fish <($out/bin/doggo completions fish) \
|
|
|
|
--zsh <($out/bin/doggo completions zsh)
|
2022-10-06 18:32:54 +00:00
|
|
|
'';
|
|
|
|
|
2024-07-27 06:49:29 +00:00
|
|
|
passthru.updateScript = nix-update-script { };
|
|
|
|
|
2022-10-06 18:32:54 +00:00
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://github.com/mr-karan/doggo";
|
|
|
|
description = "Command-line DNS Client for Humans. Written in Golang";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "doggo";
|
2022-10-06 18:32:54 +00:00
|
|
|
longDescription = ''
|
|
|
|
doggo is a modern command-line DNS client (like dig) written in Golang.
|
|
|
|
It outputs information in a neat concise manner and supports protocols like DoH, DoT, DoQ, and DNSCrypt as well
|
|
|
|
'';
|
|
|
|
license = licenses.gpl3Only;
|
|
|
|
maintainers = with maintainers; [ georgesalkhouri ];
|
|
|
|
};
|
|
|
|
}
|