nixos-config/pkgs/doggo.nix

33 lines
865 B
Nix
Raw Normal View History

2021-11-30 01:03:05 +00:00
{ stdenv, lib, fetchFromGitHub, buildGoModule, installShellFiles }:
buildGoModule rec {
pname = "doggo";
2022-07-07 11:30:20 +00:00
version = "0.5.3";
2021-11-30 01:03:05 +00:00
subPackages = [ "cmd/doggo" "cmd/api" ];
src = fetchFromGitHub {
owner = "mr-karan";
repo = "doggo";
rev = "v${version}";
2022-07-07 11:30:20 +00:00
sha256 = "sha256-K9UtHppqo+QzNTxTd9C7B97N8Nd79lR9ytj17M3QLaM=";
2021-11-30 01:03:05 +00:00
};
ldflags = [ "-X main.buildVersion=v${version}" ];
nativeBuildInputs = [ installShellFiles ];
2022-05-21 08:04:53 +00:00
vendorSha256 = "sha256-pyzu89HDFrMQqYJZC2vdqzOc6PiAbqhaTgYakmN0qj8=";
2021-11-30 01:03:05 +00:00
postInstall = ''
# The binary names come from the Makefile only without the '.bin. extension.
mv $out/bin/{api,doggo-api}
installShellCompletion completions/doggo.{fish,zsh}
'';
meta = with lib; {
description = "HTTP DNS client for humans";
2021-11-30 01:03:05 +00:00
homepage = "https://github.com/mr-karan/doggo";
license = licenses.mit;
};
}