1{ lib
2, buildGoModule
3, fetchFromGitHub
4, testers
5, jsonfmt
6}:
7
8buildGoModule rec {
9 pname = "jsonfmt";
10 version = "0.5.0";
11
12 src = fetchFromGitHub {
13 owner = "caarlos0";
14 repo = "jsonfmt";
15 rev = "v${version}";
16 hash = "sha256-rVv7Dv4vQmss4eiiy+KaO9tZ5U58WlRlsOz4QO0gdfM=";
17 };
18
19 vendorHash = "sha256-xtwN+TemiiyXOxZ2DNys4G6w4KA3BjLSWAmzox+boMY=";
20
21 ldflags = [
22 "-s"
23 "-w"
24 "-X=main.version=${version}"
25 ];
26
27 passthru.tests = {
28 version = testers.testVersion {
29 package = jsonfmt;
30 };
31 };
32
33 meta = with lib; {
34 description = "Formatter for JSON files";
35 homepage = "https://github.com/caarlos0/jsonfmt";
36 changelog = "https://github.com/caarlos0/jsonfmt/releases/tag/${src.rev}";
37 license = licenses.mit;
38 maintainers = with maintainers; [ figsoda ];
39 };
40}