Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

45 lines
1.2 KiB
Nix
Raw Normal View History

2025-02-10 20:13:59 +01:00
{
lib,
buildGoModule,
fetchFromGitHub,
versionCheckHook,
nix-update-script,
}:
2025-05-06 17:04:08 +02:00
buildGoModule (finalAttrs: {
2025-02-10 20:13:59 +01:00
pname = "carapace-bridge";
2025-05-29 04:27:31 +00:00
version = "1.2.10";
2025-02-10 20:13:59 +01:00
src = fetchFromGitHub {
owner = "carapace-sh";
repo = "carapace-bridge";
2025-05-06 17:04:08 +02:00
tag = "v${finalAttrs.version}";
2025-05-29 04:27:31 +00:00
hash = "sha256-XQtbOQw2a2B5zhTgFiAuECtY/uM7AQnbwyRpzoKcF8I=";
2025-02-10 20:13:59 +01:00
};
# buildGoModule try to run `go mod vendor` instead of `go work vendor` on the
# workspace if proxyVendor is off
proxyVendor = true;
2025-05-29 04:27:31 +00:00
vendorHash = "sha256-01WRJJiAqxmb1grvz9gWdYJ4i9pVUYmxFg9BGEuUhdA=";
2025-02-10 20:13:59 +01:00
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/";
2025-05-06 17:04:08 +02:00
changelog = "https://github.com/carapace-sh/carapace-bridge/releases/tag/v${finalAttrs.version}";
2025-02-10 20:13:59 +01:00
maintainers = with lib.maintainers; [ famfo ];
license = lib.licenses.mit;
mainProgram = "carapace-bridge";
};
2025-05-06 17:04:08 +02:00
})