nixpkgs/pkgs/servers/consul/default.nix

34 lines
718 B
Nix
Raw Normal View History

2014-06-16 00:08:44 +02:00
{ stdenv, lib, go, fetchgit, fetchhg, fetchbzr, fetchFromGitHub }:
let
version = "0.3.0";
in
stdenv.mkDerivation {
name = "consul-${version}";
src = import ./deps.nix {
inherit stdenv lib fetchgit fetchhg fetchbzr fetchFromGitHub;
};
buildInputs = [ go ];
buildPhase = ''
export GOPATH=$src
go build -v -o consul github.com/hashicorp/consul
'';
installPhase = ''
ensureDir $out/bin
cp consul $out/bin
'';
meta = with lib; {
homepage = http://www.consul.io/;
description = "A tool for service discovery, monitoring and configuration";
maintainers = with maintainers; [ cstrahan ];
license = licenses.mpl20 ;
platforms = platforms.unix;
};
}