add etcdctl package
This commit is contained in:
parent
7301dd44de
commit
70ce3ee861
30
pkgs/development/tools/etcdctl/default.nix
Normal file
30
pkgs/development/tools/etcdctl/default.nix
Normal file
@ -0,0 +1,30 @@
|
||||
{ stdenv, lib, go, fetchurl, fetchgit, fetchhg, fetchbzr, fetchFromGitHub }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version = "0.4.3";
|
||||
name = "etcdctl-${version}";
|
||||
|
||||
src = import ./deps.nix {
|
||||
inherit stdenv lib fetchgit fetchhg fetchbzr fetchFromGitHub;
|
||||
};
|
||||
|
||||
buildInputs = [ go ];
|
||||
|
||||
buildPhase = ''
|
||||
export GOPATH=$src
|
||||
go build -v -o etcdctl github.com/coreos/etcdctl
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
ensureDir $out/bin
|
||||
mv etcdctl $out/bin
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "A simple command line client for etcd";
|
||||
homepage = http://coreos.com/using-coreos/etcd/;
|
||||
license = licenses.asl20;
|
||||
maintainers = with maintainers; [ cstrahan ];
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
27
pkgs/development/tools/etcdctl/deps.nix
Normal file
27
pkgs/development/tools/etcdctl/deps.nix
Normal file
@ -0,0 +1,27 @@
|
||||
{ stdenv, lib, fetchgit, fetchhg, fetchbzr, fetchFromGitHub }:
|
||||
|
||||
let
|
||||
goDeps = [
|
||||
{
|
||||
root = "github.com/coreos/etcdctl";
|
||||
src = fetchFromGitHub {
|
||||
owner = "coreos";
|
||||
repo = "etcdctl";
|
||||
rev = "061135b2a02797a6b3c2b6c01183517c1bc76a2c";
|
||||
sha256 = "1hl9cz9ygr2k4d67qj9q1xj0n64b28qjy5sv7zylgg9h9ag2j2p4";
|
||||
};
|
||||
}
|
||||
];
|
||||
|
||||
in
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "go-deps";
|
||||
|
||||
buildCommand =
|
||||
lib.concatStrings
|
||||
(map (dep: ''
|
||||
mkdir -p $out/src/`dirname ${dep.root}`
|
||||
ln -s ${dep.src} $out/src/${dep.root}
|
||||
'') goDeps);
|
||||
}
|
@ -6642,6 +6642,8 @@ let
|
||||
|
||||
elasticmq = callPackage ../servers/elasticmq { };
|
||||
|
||||
etcdctl = callPackage ../development/tools/etcdctl { };
|
||||
|
||||
fcgiwrap = callPackage ../servers/fcgiwrap { };
|
||||
|
||||
felix = callPackage ../servers/felix { };
|
||||
|
Loading…
Reference in New Issue
Block a user