mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-24 03:43:53 +03:00
Add flannel, etcd backed network fabric for containers
This commit is contained in:
parent
9123a57e16
commit
f253186e96
30
pkgs/tools/networking/flannel/default.nix
Normal file
30
pkgs/tools/networking/flannel/default.nix
Normal 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;
|
||||
};
|
||||
}
|
28
pkgs/tools/networking/flannel/deps.nix
Normal file
28
pkgs/tools/networking/flannel/deps.nix
Normal 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);
|
||||
}
|
@ -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 { };
|
||||
|
Loading…
Reference in New Issue
Block a user