btrbk: add mainProgram (#356350)
[NixPkgs.git] / pkgs / by-name / ho / honeycomb-refinery / package.nix
blob364115b6bfee09ac4ea6f40636d7b1560d91f853
1 { lib, buildGoModule, fetchFromGitHub }:
3 buildGoModule rec {
4   pname = "honeycomb-refinery";
5   version = "1.19.0";
7   src = fetchFromGitHub {
8     owner = "honeycombio";
9     repo = "refinery";
10     rev = "v${version}";
11     hash = "sha256-SU9JbyUuBMqPw4XcoF5s8CgBn7+V/rHBAwpXJk373jg=";
12   };
14   NO_REDIS_TEST = true;
16   patches = [
17     # Allows turning off the one test requiring a Redis service during build.
18     # We could in principle implement that, but it's significant work to little
19     # payoff.
20     ./0001-add-NO_REDIS_TEST-env-var-that-disables-Redis-requir.patch
21   ];
23   excludedPackages = [ "cmd/test_redimem" ];
25   ldflags = [ "-s" "-w" "-X main.BuildID=${version}" ];
27   vendorHash = "sha256-0M05JGLdmKivRTN8ZdhAm+JtXTlYAC31wFS82g3NenI=";
29   doCheck = true;
31   meta = with lib; {
32     homepage = "https://github.com/honeycombio/refinery";
33     description = "Tail-sampling proxy for OpenTelemetry";
34     license = licenses.asl20;
35     maintainers = [ ];
36     mainProgram = "refinery";
37   };