@@ -0,0 +1,29 @@
1+{ stdenv, lib, go, fetchgit, fetchhg, fetchbzr, fetchFromGitHub }:
2+
3+stdenv.mkDerivation rec {
4+ name = "consul-template-${version}";
5+ version = "0.5.1";
6+
7+ src = import ./deps.nix {
8+ inherit stdenv lib fetchgit fetchhg fetchbzr fetchFromGitHub;
9+ };
10+
11+ buildInputs = [ go ];
12+
13+ buildPhase = ''
14+ GOPATH=$src go build -v -o consul-template github.com/hashicorp/consul-template
15+ '';
16+
17+ installPhase = ''
18+ mkdir -p $out/bin
19+ cp consul-template $out/bin
20+ '';
21+
22+ meta = with lib; {
23+ description = "Generic template rendering and notifications with Consul";
24+ homepage = https://github.com/hashicorp/consul-template;
25+ license = licenses.mpl20;
26+ maintainers = with maintainers; [ puffnfresh ];
27+ platforms = platforms.unix;
28+ };
29+}