diff options
author | Brian McKenna <brian@simpleenergy.com> | 2015-02-17 11:19:14 -0700 |
---|---|---|
committer | Brian McKenna <brian@simpleenergy.com> | 2015-02-17 11:19:14 -0700 |
commit | 69e75d0bfb61ddf94a36690b5b4e8b61e781011a (patch) | |
tree | de6b87318afd30e10a6c614304dec19437b6feae /pkgs/servers/consul | |
parent | 6be3ffb0d4d1c8f35c89c9525a7e6e11995637c7 (diff) |
Add consul-template package
Diffstat (limited to 'pkgs/servers/consul')
-rw-r--r-- | pkgs/servers/consul/deps.nix | 18 | ||||
-rw-r--r-- | pkgs/servers/consul/template.nix | 29 |
2 files changed, 47 insertions, 0 deletions
diff --git a/pkgs/servers/consul/deps.nix b/pkgs/servers/consul/deps.nix index fcfc3e911ec84..4faf1d3abc233 100644 --- a/pkgs/servers/consul/deps.nix +++ b/pkgs/servers/consul/deps.nix @@ -57,6 +57,24 @@ let }; } { + root = "github.com/hashicorp/go-multierror"; + src = fetchFromGitHub { + owner = "hashicorp"; + repo = "go-multierror"; + rev = "fcdddc395df1ddf4247c69bd436e84cfa0733f7e"; + sha256 = "1gvrm2bqi425mfg55m01z9gppfd7v4ljz1z8bykmh2sc82fj25jz"; + }; + } + { + root = "github.com/hashicorp/consul-template"; + src = fetchFromGitHub { + owner = "hashicorp"; + repo = "consul-template"; + rev = "v0.5.1"; + sha256 = "1h8sqmzf73bn12bj1yqldp9gl46gz766c3zrymwgl8p0mb74dllf"; + }; + } + { root = "github.com/hashicorp/go-checkpoint"; src = fetchFromGitHub { owner = "hashicorp"; diff --git a/pkgs/servers/consul/template.nix b/pkgs/servers/consul/template.nix new file mode 100644 index 0000000000000..2b44fc8b8a6fe --- /dev/null +++ b/pkgs/servers/consul/template.nix @@ -0,0 +1,29 @@ +{ stdenv, lib, go, fetchgit, fetchhg, fetchbzr, fetchFromGitHub }: + +stdenv.mkDerivation rec { + name = "consul-template-${version}"; + version = "0.5.1"; + + src = import ./deps.nix { + inherit stdenv lib fetchgit fetchhg fetchbzr fetchFromGitHub; + }; + + buildInputs = [ go ]; + + buildPhase = '' + GOPATH=$src go build -v -o consul-template github.com/hashicorp/consul-template + ''; + + installPhase = '' + mkdir -p $out/bin + cp consul-template $out/bin + ''; + + meta = with lib; { + description = "Generic template rendering and notifications with Consul"; + homepage = https://github.com/hashicorp/consul-template; + license = licenses.mpl20; + maintainers = with maintainers; [ puffnfresh ]; + platforms = platforms.unix; + }; +} |