depot/third_party/nixpkgs/pkgs/applications/version-management/ghq/default.nix
Default email f34ce41345 Project import generated by Copybara.
GitOrigin-RevId: b73c2221a46c13557b1b3be9c2070cc42cf01eb3
2024-07-27 08:49:29 +02:00

34 lines
842 B
Nix

{ lib, buildGoModule, fetchFromGitHub }:
buildGoModule rec {
pname = "ghq";
version = "1.6.2";
src = fetchFromGitHub {
owner = "x-motemen";
repo = "ghq";
rev = "v${version}";
sha256 = "sha256-vO/skiVq9wFWjTWyUb9IbKRAmtGSZEtBBEbW6R+oOQM=";
};
vendorHash = "sha256-qUMpHFCCzfwM4wC0FIaOrnTiqq3BlG5Jr9XlkSx2HRo=";
doCheck = false;
ldflags = [
"-X=main.Version=${version}"
];
postInstall = ''
install -m 444 -D ${src}/misc/zsh/_ghq $out/share/zsh/site-functions/_ghq
install -m 444 -D ${src}/misc/bash/_ghq $out/share/bash-completion/completions/_ghq
'';
meta = {
description = "Remote repository management made easy";
homepage = "https://github.com/x-motemen/ghq";
maintainers = with lib.maintainers; [ sigma ];
license = lib.licenses.mit;
mainProgram = "ghq";
};
}