2023-10-22 15:28:35 +00:00
|
|
|
{ buildGoModule
|
2022-08-18 05:30:48 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, installShellFiles
|
2024-07-05 12:37:26 +00:00
|
|
|
, nix-update-script
|
2023-10-22 15:28:35 +00:00
|
|
|
, lib
|
2022-08-18 05:30:48 +00:00
|
|
|
}:
|
2022-08-17 19:03:00 +00:00
|
|
|
|
2022-08-18 05:30:48 +00:00
|
|
|
buildGoModule rec {
|
|
|
|
pname = "doggo";
|
2024-09-30 10:17:56 +00:00
|
|
|
version = "1.0.5";
|
2022-08-17 19:03:00 +00:00
|
|
|
|
2022-08-18 05:30:48 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "mr-karan";
|
2024-07-05 12:37:26 +00:00
|
|
|
repo = "doggo";
|
2022-08-18 05:30:48 +00:00
|
|
|
rev = "v${version}";
|
2024-09-30 10:17:56 +00:00
|
|
|
hash = "sha256-SbTwVvE699MCgfUXifnJ1oMNN8TdLg8P03Xx5hrQxF8=";
|
2022-08-18 05:30:48 +00:00
|
|
|
};
|
2022-08-17 19:03:00 +00:00
|
|
|
|
2024-09-30 10:17:56 +00:00
|
|
|
vendorHash = "sha256-44gBPMr6gKaRaq7W69K7OBTVXvsz9pSEL1eOKYd4fT8=";
|
2022-08-18 05:30:48 +00:00
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
subPackages = [ "cmd/doggo" ];
|
2022-08-17 19:03:00 +00:00
|
|
|
|
2022-08-18 05:30:48 +00:00
|
|
|
ldflags = [
|
2024-07-05 12:37:26 +00:00
|
|
|
"-s"
|
2022-08-18 05:30:48 +00:00
|
|
|
"-X main.buildVersion=v${version}"
|
|
|
|
];
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
installShellCompletion --cmd doggo \
|
2024-07-05 12:37:26 +00:00
|
|
|
--bash <($out/bin/doggo completions bash) \
|
|
|
|
--fish <($out/bin/doggo completions fish) \
|
|
|
|
--zsh <($out/bin/doggo completions zsh)
|
2022-08-18 05:30:48 +00:00
|
|
|
'';
|
|
|
|
|
2024-07-05 12:37:26 +00:00
|
|
|
passthru.updateScript = nix-update-script { };
|
|
|
|
|
2022-08-18 05:30:48 +00:00
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://github.com/mr-karan/doggo";
|
|
|
|
description = "Command-line DNS Client for Humans. Written in Golang";
|
2024-03-19 02:14:51 +00:00
|
|
|
mainProgram = "doggo";
|
2022-08-18 05:30:48 +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;
|
2024-09-30 10:17:56 +00:00
|
|
|
maintainers = with maintainers; [ georgesalkhouri ma27 ];
|
2022-08-18 05:30:48 +00:00
|
|
|
};
|
|
|
|
}
|