2016-06-07 22:32:34 +02:00
|
|
|
{ stdenv, lib, buildGoPackage, consul-ui, fetchFromGitHub }:
|
2016-06-04 20:40:56 +02:00
|
|
|
|
2016-06-07 22:32:34 +02:00
|
|
|
buildGoPackage rec {
|
2016-06-04 20:40:56 +02:00
|
|
|
name = "consul-${version}";
|
2017-02-16 19:54:08 +01:00
|
|
|
version = "0.7.5";
|
2016-06-04 20:40:56 +02:00
|
|
|
rev = "v${version}";
|
|
|
|
|
|
|
|
goPackagePath = "github.com/hashicorp/consul";
|
|
|
|
|
2016-06-04 23:24:19 +02:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "hashicorp";
|
|
|
|
repo = "consul";
|
2016-06-04 20:40:56 +02:00
|
|
|
inherit rev;
|
2017-02-16 19:54:08 +01:00
|
|
|
sha256 = "0zh4j5p0v41v7i6v084dgsdchx1azjs2mjb3dlfdv671rsnwi54z";
|
2016-06-04 20:40:56 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
# Keep consul.ui for backward compatability
|
2016-06-04 23:24:19 +02:00
|
|
|
passthru.ui = consul-ui;
|
2017-02-16 19:54:08 +01:00
|
|
|
|
2017-04-04 00:13:15 +02: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-09-09 00:21:17 +02:00
|
|
|
preFixup = stdenv.lib.optionalString stdenv.isDarwin ''
|
|
|
|
install_name_tool -delete_rpath $out/lib $bin/bin/consul
|
|
|
|
'';
|
|
|
|
|
2017-02-16 19:54:08 +01:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Tool for service discovery, monitoring and configuration";
|
2017-08-01 22:03:30 +02:00
|
|
|
homepage = https://www.consul.io/;
|
2017-02-16 19:54:08 +01:00
|
|
|
platforms = platforms.linux ++ platforms.darwin;
|
|
|
|
license = licenses.mpl20;
|
|
|
|
maintainers = with maintainers; [ pradeepchhetri ];
|
|
|
|
};
|
2016-06-04 20:40:56 +02:00
|
|
|
}
|