mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-07-06 17:13:24 -05:00
gwq: init at 0.1.1 (#465521)
This commit is contained in:
commit
2727b65d6c
2 changed files with 82 additions and 0 deletions
|
|
@ -20853,6 +20853,11 @@
|
|||
githubId = 31112680;
|
||||
name = "oidro";
|
||||
};
|
||||
ojii3 = {
|
||||
github = "OJII3";
|
||||
githubId = 84656786;
|
||||
name = "OJII3";
|
||||
};
|
||||
ojsef39 = {
|
||||
name = "Josef Hofer";
|
||||
github = "ojsef39";
|
||||
|
|
|
|||
77
pkgs/by-name/gw/gwq/package.nix
Normal file
77
pkgs/by-name/gw/gwq/package.nix
Normal 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;
|
||||
};
|
||||
})
|
||||
Loading…
Add table
Add a link
Reference in a new issue