aboutsummaryrefslogtreecommitdiff
path: root/nixpkgs/pkgs/development/tools/conftest/default.nix
blob: 4c8792cc6aa0095c507857654ce9613725f33609 (plain)
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, buildGoModule, fetchFromGitHub }:

buildGoModule rec {
  pname = "conftest";
  version = "0.12.0";

  src = fetchFromGitHub {
    owner = "instrumenta";
    repo = "conftest";
    rev = "v${version}";
    sha256 = "0blrbbnvnnxyw0idhglqdz16i7g6g86a6kw2iw707bg0yfdl1ncq";
  };

  patches = [
    # Version 0.12.0 does not build with go 1.13. See https://github.com/instrumenta/conftest/pull/85.
    # TODO: Remove once https://github.com/instrumenta/conftest/pull/85 is merged and lands in a release.
    ./go-1.13-deps.patch
  ];

  buildFlagsArray = ''
    -ldflags=
        -X main.version=${version}
  '';

  modSha256 = "11999ywy73ng45gl1qypky8342jvishcp11bdxbigvqhwl2zbpav";

  meta = with lib; {
    description = "Write tests against structured configuration data";
    homepage = https://github.com/instrumenta/conftest;
    license = licenses.asl20;
    maintainers = with maintainers; [ yurrriq ];
    platforms = platforms.all;
  };
}