{ lib, buildGoModule, fetchFromGitHub, versionCheckHook, nix-update-script, }: buildGoModule (finalAttrs: { pname = "carapace-bridge"; version = "1.2.10"; src = fetchFromGitHub { owner = "carapace-sh"; repo = "carapace-bridge"; tag = "v${finalAttrs.version}"; hash = "sha256-XQtbOQw2a2B5zhTgFiAuECtY/uM7AQnbwyRpzoKcF8I="; }; # buildGoModule try to run `go mod vendor` instead of `go work vendor` on the # workspace if proxyVendor is off proxyVendor = true; vendorHash = "sha256-01WRJJiAqxmb1grvz9gWdYJ4i9pVUYmxFg9BGEuUhdA="; postPatch = '' substituteInPlace cmd/carapace-bridge/main.go \ --replace-fail "var version = \"develop\"" "var version = \"$version\"" ''; nativeInstallCheckInputs = [ versionCheckHook ]; versionCheckProgramArg = "--version"; doInstallCheck = true; passthru.updateScript = nix-update-script { }; meta = { description = "Multi-shell completion bridge for carapace"; homepage = "https://carapace.sh/"; changelog = "https://github.com/carapace-sh/carapace-bridge/releases/tag/v${finalAttrs.version}"; maintainers = with lib.maintainers; [ famfo ]; license = lib.licenses.mit; mainProgram = "carapace-bridge"; }; })