2023-04-29 12:03:00 +00:00
|
|
|
{ lib, fetchFromGitHub, buildGoModule, installShellFiles }:
|
2021-11-10 08:27:32 +00:00
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "nali";
|
2023-05-03 04:48:13 +00:00
|
|
|
version = "0.7.3";
|
2021-11-10 08:27:32 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "zu1k";
|
|
|
|
repo = "nali";
|
|
|
|
rev = "v${version}";
|
2023-05-03 04:48:13 +00:00
|
|
|
sha256 = "sha256-ZKLxsq7ybom96NKWkioROAVXUoY20zFBZn7ksk4XvT4=";
|
2021-11-10 08:27:32 +00:00
|
|
|
};
|
|
|
|
|
2023-04-29 12:02:15 +00:00
|
|
|
vendorHash = "sha256-l3Fs1Hd0kXI56uotic1407tb4ltkCSMzqqozFpvobH8=";
|
2021-11-10 08:27:32 +00:00
|
|
|
subPackages = [ "." ];
|
|
|
|
|
2023-04-29 12:03:00 +00:00
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
installShellCompletion --cmd nali \
|
|
|
|
--bash <($out/bin/nali completion bash) \
|
|
|
|
--fish <($out/bin/nali completion fish) \
|
|
|
|
--zsh <($out/bin/nali completion zsh)
|
|
|
|
'';
|
|
|
|
|
2021-11-10 08:27:32 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "An offline tool for querying IP geographic information and CDN provider";
|
|
|
|
homepage = "https://github.com/zu1k/nali";
|
|
|
|
license = licenses.mit;
|
2022-06-20 05:21:28 +00:00
|
|
|
maintainers = with maintainers; [ diffumist xyenon ];
|
2021-11-10 08:27:32 +00:00
|
|
|
};
|
|
|
|
}
|