summary refs log blame commit diff
path: root/pkgs/servers/monitoring/prometheus/redis-exporter.nix
blob: a2636d9f71476af829128237289d9d76e9886937 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
                                                    
 
                   
                           
                     




                            
                                                                    

    
                                                                        







                                      


                        

                                                                        
                    


                                                          
                                                      


                               
{ lib, buildGoModule, fetchFromGitHub, nixosTests }:

buildGoModule rec {
  pname = "redis_exporter";
  version = "1.23.1";

  src = fetchFromGitHub {
    owner = "oliver006";
    repo = "redis_exporter";
    rev = "v${version}";
    sha256 = "0hlzxmc3jnmbym7by89bb73nlr0gw1xj8d88x10zx55kry7p0jfn";
  };

  vendorSha256 = "11237959ikd7l5glkhfz0g55mbld2hq985b5crwb9bnimaly5lga";

  buildFlagsArray = ''
    -ldflags=
       -X main.BuildVersion=${version}
       -X main.BuildCommitSha=unknown
       -X main.BuildDate=unknown
  '';

  # needs a redis server
  doCheck = false;

  passthru.tests = { inherit (nixosTests.prometheus-exporters) redis; };

  meta = with lib; {
    description = "Prometheus exporter for Redis metrics";
    inherit (src.meta) homepage;
    license = licenses.mit;
    maintainers = with maintainers; [ eskytthe srhb ];
    platforms = platforms.unix;
  };
}