gwq: init at 0.1.1 (#465521)

This commit is contained in:
Arne Keller 2026-07-03 19:37:51 +00:00 committed by GitHub
commit 2727b65d6c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 82 additions and 0 deletions

View file

@ -20853,6 +20853,11 @@
githubId = 31112680;
name = "oidro";
};
ojii3 = {
github = "OJII3";
githubId = 84656786;
name = "OJII3";
};
ojsef39 = {
name = "Josef Hofer";
github = "ojsef39";

View file

@ -0,0 +1,77 @@
{
lib,
buildGoModule,
fetchFromGitHub,
gitMinimal,
installShellFiles,
makeWrapper,
tmux,
writableTmpDirAsHomeHook,
versionCheckHook,
stdenv,
}:
buildGoModule (finalAttrs: {
pname = "gwq";
version = "0.1.1";
src = fetchFromGitHub {
owner = "d-kuro";
repo = "gwq";
tag = "v${finalAttrs.version}";
hash = "sha256-MfCYFbODWnfPxx+6sLlcMT6tqghgILHB13+ccYqVjBA=";
};
vendorHash = "sha256-4K01Xf1EXl/NVX1loQ76l1bW8QglBAQdvlZSo7J4NPI=";
subPackages = [ "cmd/gwq" ];
__structuredAttrs = true;
ldflags = [
"-s"
"-w"
"-X github.com/d-kuro/gwq/internal/cmd.version=v${finalAttrs.version}"
];
nativeBuildInputs = [
installShellFiles
makeWrapper
];
nativeCheckInputs = [
writableTmpDirAsHomeHook
];
nativeInstallCheckInputs = [
versionCheckHook
];
postInstall = ''
wrapProgram $out/bin/gwq \
--prefix PATH : ${
lib.makeBinPath [
gitMinimal
tmux
]
}
''
+ lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
installShellCompletion --cmd gwq \
--bash <($out/bin/gwq completion bash) \
--fish <($out/bin/gwq completion fish) \
--zsh <($out/bin/gwq completion zsh)
'';
doInstallCheck = true;
meta = {
description = "Git worktree manager with fuzzy finder interface";
homepage = "https://github.com/d-kuro/gwq";
changelog = "https://github.com/d-kuro/gwq/releases/tag/v${finalAttrs.version}";
license = lib.licenses.asl20;
mainProgram = "gwq";
maintainers = with lib.maintainers; [ ojii3 ];
platforms = lib.platforms.unix;
};
})