about summary refs log tree commit diff
path: root/pkgs/by-name/do/doggo
diff options
context:
space:
mode:
authornat <nat@nekopon.pl>2023-10-22 17:32:01 +0200
committernat <nat@nekopon.pl>2023-10-22 17:32:01 +0200
commit662cc7d367558d4808d2f7326a19cd6c2865ad35 (patch)
tree688010c2d93b588724ea34e180ff244e893ca97a /pkgs/by-name/do/doggo
parentf41abe7cb9cbd20454f984134474a017aa1fb131 (diff)
doggo: migrate to by-name
Diffstat (limited to 'pkgs/by-name/do/doggo')
-rw-r--r--pkgs/by-name/do/doggo/package.nix43
1 files changed, 43 insertions, 0 deletions
diff --git a/pkgs/by-name/do/doggo/package.nix b/pkgs/by-name/do/doggo/package.nix
new file mode 100644
index 0000000000000..cdd19bc37b906
--- /dev/null
+++ b/pkgs/by-name/do/doggo/package.nix
@@ -0,0 +1,43 @@
+{ buildGoModule
+, fetchFromGitHub
+, installShellFiles
+, lib
+}:
+
+buildGoModule rec {
+  pname = "doggo";
+  version = "0.5.7";
+
+  src = fetchFromGitHub {
+    owner = "mr-karan";
+    repo = pname;
+    rev = "v${version}";
+    hash = "sha256-hzl7BE3vsE2G9O2nwN/gkqQTJ+9aDfNIjmpmgN1AYq8=";
+  };
+
+  vendorHash = "sha256-uonybBLABPj9CPtc+y82ajvQI7kubK+lKi4eLcZIUqA=";
+  nativeBuildInputs = [ installShellFiles ];
+  subPackages = [ "cmd/doggo" ];
+
+  ldflags = [
+    "-w -s"
+    "-X main.buildVersion=v${version}"
+  ];
+
+  postInstall = ''
+    installShellCompletion --cmd doggo \
+      --fish --name doggo.fish completions/doggo.fish \
+      --zsh --name _doggo completions/doggo.zsh
+  '';
+
+  meta = with lib; {
+    homepage = "https://github.com/mr-karan/doggo";
+    description = "Command-line DNS Client for Humans. Written in Golang";
+    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 ];
+  };
+}