fork
Configure Feed
Select the types of activity you want to include in your feed.
nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
fork
Configure Feed
Select the types of activity you want to include in your feed.
1{
2 lib,
3 stdenv,
4 fetchFromGitHub,
5 buildGoModule,
6 installShellFiles,
7}:
8
9buildGoModule rec {
10 pname = "nali";
11 version = "0.8.1";
12
13 src = fetchFromGitHub {
14 owner = "zu1k";
15 repo = "nali";
16 rev = "v${version}";
17 hash = "sha256-5AI8TAKYFqjgLVKob9imrf7yVmXmAPq/zHh1bDfC5r0=";
18 };
19
20 vendorHash = "sha256-wIp/ShUddz+RIcsEuKWUfxsV/wNB2X1jZtIltBZ0ROM=";
21 subPackages = [ "." ];
22
23 nativeBuildInputs = [ installShellFiles ];
24
25 env.CGO_ENABLED = 0;
26 ldflags = [
27 "-s"
28 "-w"
29 "-X github.com/zu1k/nali/internal/constant.Version=${version}"
30 ];
31
32 postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
33 export HOME="$TMPDIR"
34 # write to temp files to avoid race condition in config loading
35 $out/bin/nali completion bash > nali.bash
36 $out/bin/nali completion fish > nali.fish
37 $out/bin/nali completion zsh > nali.zsh
38 installShellCompletion --cmd nali nali.{bash,fish,zsh}
39 '';
40
41 meta = with lib; {
42 description = "Offline tool for querying IP geographic information and CDN provider";
43 homepage = "https://github.com/zu1k/nali";
44 license = licenses.mit;
45 maintainers = with maintainers; [
46 diffumist
47 xyenon
48 ];
49 mainProgram = "nali";
50 };
51}