about summary refs log tree commit diff
path: root/pkgs/development/tools/fq/default.nix
blob: 5d1c730e925b4d131ec337aa50166d66f09bf60f (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
, buildGo117Module
, fetchFromGitHub
, fq
, testVersion
}:

buildGo117Module rec {
  pname = "fq";
  version = "0.0.2";

  src = fetchFromGitHub {
    owner = "wader";
    repo = "fq";
    rev = "v${version}";
    sha256 = "sha256-ykjt9MPkN5dgTaY2VhApNt5DKh9TFapMpoHwLdpOKcw=";
  };

  vendorSha256 = "sha256-89rSpxhP35wreo+0AqM+rDICCPchF+yFVvrTtZ2Xwr4=";

  ldflags = [
    "-s"
    "-w"
    "-X main.version=${version}"
  ];

  passthru.tests = testVersion { package = fq; };

  meta = with lib; {
    description = "jq for binary formats";
    homepage = "https://github.com/wader/fq";
    license = licenses.mit;
    maintainers = with maintainers; [ siraben ];
  };
}