about summary refs log tree commit diff
path: root/pkgs/development/tools/zq/default.nix
blob: 956ce70b41b04e28c6cfa019de20f2203f47ed3a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
{ lib
, stdenv
, fetchFromGitHub
, buildGoModule
, testers
, zq
}:

buildGoModule rec {
  pname = "zq";
  version = "1.2.0";

  src = fetchFromGitHub {
    owner = "brimdata";
    repo = "zed";
    rev = "v${version}";
    hash = "sha256-BK4LB37jr/9O0sjYgFtnEkbFqTsp/1+hcmCNMFDPiPM=";
  };

  vendorSha256 = "sha256-oAkQRUaEP/RNjpDH4U8XFVokf7KiLk0OWMX+U7qny70=";

  subPackages = [ "cmd/zq" ];

  ldflags = [ "-s" "-X" "github.com/brimdata/zed/cli.Version=${version}" ];

  passthru.tests = testers.testVersion { package = zq; };

  meta = with lib; {
    description = "A command-line tool for processing data in diverse input formats, providing search, analytics, and extensive transformations using the Zed language";
    homepage = "https://zed.brimdata.io";
    license = licenses.bsd3;
    maintainers = with maintainers; [ knl ];
  };
}