mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-24 16:03:23 +00:00
b426c85ce2
This requires some small changes in the stdenv, then working around the weird choice LLVM made to hardcode @rpath in its install name, and then lets us remove a ton of annoying workaround hacks in many of our Go packages. With any luck this will mean less hackery going forward.
32 lines
975 B
Nix
32 lines
975 B
Nix
{ stdenv, lib, buildGoPackage, consul-ui, fetchFromGitHub }:
|
|
|
|
buildGoPackage rec {
|
|
name = "consul-${version}";
|
|
version = "0.9.3";
|
|
rev = "v${version}";
|
|
|
|
goPackagePath = "github.com/hashicorp/consul";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "hashicorp";
|
|
repo = "consul";
|
|
inherit rev;
|
|
sha256 = "1176frp7kimpycsmz9wrbizf46jgxr8jq7hz5w4q1x90lswvrxv3";
|
|
};
|
|
|
|
# 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=")
|
|
'';
|
|
|
|
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 ];
|
|
};
|
|
}
|