about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/tools/jid/default.nix
blob: cecb179c467ec5b1f97e50dc899395b6eac0e333 (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
35
{ lib, buildGoModule, fetchFromGitHub, testers, jid }:

buildGoModule rec {
  pname = "jid";
  version = "0.7.6";

  src = fetchFromGitHub {
    owner = "simeji";
    repo = "jid";
    rev = "v${version}";
    hash = "sha256-fZzEbVNGsDNQ/FhII+meQvKeyrgxn3wtFW8VfNmJz5U=";
  };

  vendorHash = "sha256-Lq8ouTjPsGhqDwrCMpqkSU7FEGszYwAkwl92vAEZ68w=";

  patches = [
    # Run go mod tidy
    ./go-mod.patch
  ];

  ldflags = [ "-s" "-w" ];

  passthru.tests.version = testers.testVersion {
    package = jid;
    version = "v${version}";
  };

  meta = {
    description = "A command-line tool to incrementally drill down JSON";
    mainProgram = "jid";
    homepage = "https://github.com/simeji/jid";
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [ stesie ];
  };
}