nixpkgs/pkgs/servers/consul/default.nix

32 lines
975 B
Nix
Raw Normal View History

2016-06-07 23:32:34 +03:00
{ stdenv, lib, buildGoPackage, consul-ui, fetchFromGitHub }:
2016-06-04 21:40:56 +03:00
2016-06-07 23:32:34 +03:00
buildGoPackage rec {
2016-06-04 21:40:56 +03:00
name = "consul-${version}";
2017-09-28 02:04:18 +03:00
version = "0.9.3";
2016-06-04 21:40:56 +03:00
rev = "v${version}";
goPackagePath = "github.com/hashicorp/consul";
2016-06-05 00:24:19 +03:00
src = fetchFromGitHub {
owner = "hashicorp";
repo = "consul";
2016-06-04 21:40:56 +03:00
inherit rev;
2017-09-28 02:04:18 +03:00
sha256 = "1176frp7kimpycsmz9wrbizf46jgxr8jq7hz5w4q1x90lswvrxv3";
2016-06-04 21:40:56 +03:00
};
# Keep consul.ui for backward compatability
2016-06-05 00:24:19 +03:00
passthru.ui = consul-ui;
2017-02-16 21:54:08 +03:00
preBuild = ''
buildFlagsArray+=("-ldflags" "-X github.com/hashicorp/consul/version.GitDescribe=v${version} -X github.com/hashicorp/consul/version.Version=${version} -X github.com/hashicorp/consul/version.VersionPrerelease=")
'';
2017-02-16 21:54:08 +03:00
meta = with stdenv.lib; {
description = "Tool for service discovery, monitoring and configuration";
homepage = https://www.consul.io/;
2017-02-16 21:54:08 +03:00
platforms = platforms.linux ++ platforms.darwin;
license = licenses.mpl20;
maintainers = with maintainers; [ pradeepchhetri ];
};
2016-06-04 21:40:56 +03:00
}