depot/third_party/nixpkgs/pkgs/applications/version-management/ghorg/default.nix
Default email 472aeafc57 Project import generated by Copybara.
GitOrigin-RevId: c31898adf5a8ed202ce5bea9f347b1c6871f32d1
2024-10-04 18:56:33 +02:00

45 lines
1.3 KiB
Nix

{ lib, buildGoModule, fetchFromGitHub, installShellFiles }:
buildGoModule rec {
pname = "ghorg";
version = "1.11.0";
src = fetchFromGitHub {
owner = "gabrie30";
repo = "ghorg";
rev = "v${version}";
sha256 = "sha256-tsR7cBpDa311rLI1CTXD2LLl3j2PxkBeQsjkUP99iIo=";
};
doCheck = false;
vendorHash = null;
subPackages = [ "." ];
ldflags = [ "-s" "-w" "-X main.version=${version}" ];
nativeBuildInputs = [ installShellFiles ];
postInstall = ''
installShellCompletion --cmd ghorg \
--bash <($out/bin/ghorg completion bash) \
--fish <($out/bin/ghorg completion fish) \
--zsh <($out/bin/ghorg completion zsh)
'';
meta = with lib; {
description = "Quickly clone an entire org/users repositories into one directory";
longDescription = ''
ghorg allows you to quickly clone all of an orgs, or users repos into a
single directory. This can be useful in many situations including
- Searching an orgs/users codebase with ack, silver searcher, grep etc..
- Bash scripting
- Creating backups
- Onboarding
- Performing Audits
'';
homepage = "https://github.com/gabrie30/ghorg";
license = licenses.asl20;
maintainers = with maintainers; [ vidbina ];
mainProgram = "ghorg";
};
}