Files
nixpkgs/pkgs/by-name/go/gosmee/package.nix
KangaZero f5eca56b8f gosmee: 0.31.0 -> 0.32.0
Added `checkFlags` to skip a test that requires network access
2026-09-06 22:28:59 +09:00

65 lines
1.5 KiB
Nix

{
lib,
stdenv,
buildGoModule,
fetchFromGitHub,
installShellFiles,
versionCheckHook,
nix-update-script,
}:
buildGoModule (finalAttrs: {
pname = "gosmee";
version = "0.32.0";
src = fetchFromGitHub {
owner = "chmouel";
repo = "gosmee";
tag = "v${finalAttrs.version}";
hash = "sha256-Qdp36Z6p+4mSafPjJjF/gswpWpglzinYsMyApGd3k3Q=";
};
vendorHash = null;
nativeBuildInputs = [ installShellFiles ];
__darwinAllowLocalNetworking = true;
checkFlags =
let
# Skip tests that require network access
skippedTests = [
"TestRunExecCommand"
];
in
[ "-skip=^${builtins.concatStringsSep "$|^" skippedTests}$" ];
postPatch = ''
printf ${finalAttrs.version} > gosmee/templates/version
'';
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
installShellCompletion --cmd gosmee \
--bash <($out/bin/gosmee completion bash) \
--fish <($out/bin/gosmee completion fish) \
--zsh <($out/bin/gosmee completion zsh)
'';
doInstallCheck = true;
nativeInstallCheckInputs = [ versionCheckHook ];
passthru.updateScript = nix-update-script { };
meta = {
description = "Command line server and client for webhooks deliveries (and https://smee.io)";
homepage = "https://github.com/chmouel/gosmee";
changelog = "https://github.com/chmouel/gosmee/releases/tag/v${finalAttrs.version}";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [
vdemeester
chmouel
];
mainProgram = "gosmee";
};
})