Files
nixpkgs/pkgs/by-name/gi/git-spice/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

64 lines
1.6 KiB
Nix

{
lib,
stdenv,
buildGoModule,
fetchFromGitHub,
git,
nix-update-script,
installShellFiles,
}:
buildGoModule (finalAttrs: {
pname = "git-spice";
version = "0.18.0";
src = fetchFromGitHub {
owner = "abhinav";
repo = "git-spice";
tag = "v${finalAttrs.version}";
hash = "sha256-9Gt4dS1Wu3w/iS0vtYO3XHyknKQEveob9slwNA/HAks=";
};
vendorHash = "sha256-VCUNaWi14Pc39ncWzZZsdsZSd+IxYFhbm1cfTZ40dMw=";
subPackages = [ "." ];
nativeBuildInputs = [ installShellFiles ];
nativeCheckInputs = [ git ];
buildInputs = [ git ];
ldflags = [
"-s"
"-w"
"-X=main._version=${finalAttrs.version}"
];
__darwinAllowLocalNetworking = true;
preCheck = lib.optionalString (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) ''
# timeout
rm testdata/script/branch_submit_remote_prompt.txt
rm testdata/script/branch_submit_multiple_pr_templates.txt
'';
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
installShellCompletion --cmd gs \
--bash <($out/bin/gs shell completion bash) \
--zsh <($out/bin/gs shell completion zsh) \
--fish <($out/bin/gs shell completion fish)
'';
passthru.updateScript = nix-update-script { };
meta = {
description = "Manage stacked Git branches";
homepage = "https://abhinav.github.io/git-spice/";
changelog = "https://github.com/abhinav/git-spice/blob/${finalAttrs.src.rev}/CHANGELOG.md";
license = lib.licenses.gpl3Only;
maintainers = [ lib.maintainers.vinnymeller ];
mainProgram = "gs";
};
})