1 { lib, stdenv, fetchFromGitHub, buildGoModule, installShellFiles }:
7 src = fetchFromGitHub {
11 hash = "sha256-5AI8TAKYFqjgLVKob9imrf7yVmXmAPq/zHh1bDfC5r0=";
14 vendorHash = "sha256-wIp/ShUddz+RIcsEuKWUfxsV/wNB2X1jZtIltBZ0ROM=";
15 subPackages = [ "." ];
17 nativeBuildInputs = [ installShellFiles ];
20 ldflags = [ "-s" "-w" "-X github.com/zu1k/nali/internal/constant.Version=${version}" ];
22 postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
24 # write to temp files to avoid race condition in config loading
25 $out/bin/nali completion bash > nali.bash
26 $out/bin/nali completion fish > nali.fish
27 $out/bin/nali completion zsh > nali.zsh
28 installShellCompletion --cmd nali nali.{bash,fish,zsh}
32 description = "Offline tool for querying IP geographic information and CDN provider";
33 homepage = "https://github.com/zu1k/nali";
34 license = licenses.mit;
35 maintainers = with maintainers; [ diffumist xyenon ];