mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-02 15:41:48 +00:00
36 lines
1.1 KiB
Nix
36 lines
1.1 KiB
Nix
{ stdenv, lib, buildGoPackage, consul-ui, fetchFromGitHub }:
|
|
|
|
buildGoPackage rec {
|
|
name = "consul-${version}";
|
|
version = "0.7.5";
|
|
rev = "v${version}";
|
|
|
|
goPackagePath = "github.com/hashicorp/consul";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "hashicorp";
|
|
repo = "consul";
|
|
inherit rev;
|
|
sha256 = "0zh4j5p0v41v7i6v084dgsdchx1azjs2mjb3dlfdv671rsnwi54z";
|
|
};
|
|
|
|
# Keep consul.ui for backward compatability
|
|
passthru.ui = consul-ui;
|
|
|
|
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=")
|
|
'';
|
|
|
|
preFixup = stdenv.lib.optionalString stdenv.isDarwin ''
|
|
install_name_tool -delete_rpath $out/lib $bin/bin/consul
|
|
'';
|
|
|
|
meta = with stdenv.lib; {
|
|
description = "Tool for service discovery, monitoring and configuration";
|
|
homepage = https://www.consul.io/;
|
|
platforms = platforms.linux ++ platforms.darwin;
|
|
license = licenses.mpl20;
|
|
maintainers = with maintainers; [ pradeepchhetri ];
|
|
};
|
|
}
|