nixpkgs/pkgs/by-name/go/gosmee/package.nix
2024-05-29 02:08:12 +00:00

39 lines
916 B
Nix

{ lib
, buildGoModule
, fetchFromGitHub
, installShellFiles
}:
buildGoModule rec {
pname = "gosmee";
version = "0.22.0";
src = fetchFromGitHub {
owner = "chmouel";
repo = "gosmee";
rev = "v${version}";
sha256 = "sha256-PP+N8BihgSvYL7yHlBJOK4zWkuM75iaGc7Gld+c0D6Y=";
};
vendorHash = null;
nativeBuildInputs = [ installShellFiles ];
postPatch = ''
printf ${version} > gosmee/templates/version
'';
postInstall = ''
installShellCompletion --cmd gosmee \
--bash <($out/bin/gosmee completion bash) \
--fish <($out/bin/gosmee completion fish) \
--zsh <($out/bin/gosmee completion zsh)
'';
meta = {
description = "Command line server and client for webhooks deliveries (and https://smee.io)";
homepage = "https://github.com/chmouel/gosmee";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ vdemeester chmouel ];
};
}