Add flannel, etcd backed network fabric for containers

This commit is contained in:
Jaka Hudoklin 2014-11-04 19:32:30 +01:00
parent 9123a57e16
commit f253186e96
3 changed files with 60 additions and 0 deletions

View File

@ -0,0 +1,30 @@
{ stdenv, lib, go, fetchurl, fetchgit, fetchhg, fetchbzr, fetchFromGitHub }:
stdenv.mkDerivation rec {
version = "0.1.0";
name = "flannel-${version}";
src = import ./deps.nix {
inherit stdenv lib fetchFromGitHub;
};
buildInputs = [ go ];
buildPhase = ''
export GOPATH=$src
go build -v -o flannel github.com/coreos/flannel
'';
installPhase = ''
mkdir -p $out/bin
mv flannel $out/bin/flannel
'';
meta = with stdenv.lib; {
description = "Flannel is an etcd backed network fabric for containers";
homepage = https://github.com/coreos/flannel;
license = licenses.asl20;
maintainers = with maintainers; [ offline ];
platforms = platforms.unix;
};
}

View File

@ -0,0 +1,28 @@
# This file was generated by go2nix.
{ stdenv, lib, fetchFromGitHub }:
let
goDeps = [
{
root = "github.com/coreos/flannel";
src = fetchFromGitHub {
owner = "coreos";
repo = "flannel";
rev = "cd584fa5e1545ae86c965588e81ceb24455e980d";
sha256 = "1f7x6a2c8ix6j5y1r0dq56b58bl2rs2ycbdqb9fz5zv1zk2w20rd";
};
}
];
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);
}

View File

@ -1119,6 +1119,8 @@ let
fdm = callPackage ../tools/networking/fdm {};
flannel = callPackage ../tools/networking/flannel { };
figlet = callPackage ../tools/misc/figlet { };
file = callPackage ../tools/misc/file { };