2024-01-13 08:15:51 +00:00
|
|
|
{ lib, buildGoModule, fetchFromGitHub, installShellFiles }:
|
2020-10-19 09:53:12 +00:00
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "ghorg";
|
2023-10-09 19:29:22 +00:00
|
|
|
version = "1.9.9";
|
2020-10-19 09:53:12 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "gabrie30";
|
|
|
|
repo = "ghorg";
|
2022-03-05 16:20:37 +00:00
|
|
|
rev = "v${version}";
|
2023-10-09 19:29:22 +00:00
|
|
|
sha256 = "sha256-yq95+MHMbzVg8i/55EZBVCVkE3uwD964fAaXWP5aWYw=";
|
2020-10-19 09:53:12 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
doCheck = false;
|
2023-04-29 16:46:19 +00:00
|
|
|
vendorHash = null;
|
2020-10-19 09:53:12 +00:00
|
|
|
|
|
|
|
subPackages = [ "." ];
|
|
|
|
|
2021-08-27 14:25:00 +00:00
|
|
|
ldflags = [ "-s" "-w" "-X main.version=${version}" ];
|
2020-10-19 09:53:12 +00:00
|
|
|
|
2024-01-13 08:15:51 +00:00
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
postInstall = ''
|
|
|
|
installShellCompletion --cmd ghorg \
|
|
|
|
--bash <($out/bin/ghorg completion bash) \
|
|
|
|
--fish <($out/bin/ghorg completion fish) \
|
|
|
|
--zsh <($out/bin/ghorg completion zsh)
|
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-10-19 09:53:12 +00:00
|
|
|
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 ];
|
2024-01-02 11:29:13 +00:00
|
|
|
mainProgram = "ghorg";
|
2020-10-19 09:53:12 +00:00
|
|
|
};
|
|
|
|
}
|