diff options
author | Jaka Hudoklin <jakahudoklin@gmail.com> | 2014-11-04 19:32:30 +0100 |
---|---|---|
committer | Jaka Hudoklin <jakahudoklin@gmail.com> | 2014-11-04 19:32:30 +0100 |
commit | f253186e962c20c7d91038aa7c0506bd87779ae7 (patch) | |
tree | 02efd8a317b1ef38111df1fb80b6cb7a5c68e47d /pkgs/tools/networking/flannel | |
parent | 9123a57e16dd8b9fc7c6fd56d2c17771567bebd6 (diff) | |
download | nixpkgs-f253186e962c20c7d91038aa7c0506bd87779ae7.tar nixpkgs-f253186e962c20c7d91038aa7c0506bd87779ae7.tar.gz nixpkgs-f253186e962c20c7d91038aa7c0506bd87779ae7.tar.bz2 nixpkgs-f253186e962c20c7d91038aa7c0506bd87779ae7.tar.lz nixpkgs-f253186e962c20c7d91038aa7c0506bd87779ae7.tar.xz nixpkgs-f253186e962c20c7d91038aa7c0506bd87779ae7.tar.zst nixpkgs-f253186e962c20c7d91038aa7c0506bd87779ae7.zip |
Add flannel, etcd backed network fabric for containers
Diffstat (limited to 'pkgs/tools/networking/flannel')
-rw-r--r-- | pkgs/tools/networking/flannel/default.nix | 30 | ||||
-rw-r--r-- | pkgs/tools/networking/flannel/deps.nix | 28 |
2 files changed, 58 insertions, 0 deletions
diff --git a/pkgs/tools/networking/flannel/default.nix b/pkgs/tools/networking/flannel/default.nix new file mode 100644 index 00000000000..be6d1658d3e --- /dev/null +++ b/pkgs/tools/networking/flannel/default.nix @@ -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; + }; +} diff --git a/pkgs/tools/networking/flannel/deps.nix b/pkgs/tools/networking/flannel/deps.nix new file mode 100644 index 00000000000..3af2404ba78 --- /dev/null +++ b/pkgs/tools/networking/flannel/deps.nix @@ -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); +} |