Port flannel to buildGoPackage
This commit is contained in:
@@ -1,26 +1,19 @@
|
||||
{ stdenv, lib, go, fetchurl, fetchgit, fetchhg, fetchbzr, fetchFromGitHub }:
|
||||
{ lib, goPackages, fetchFromGitHub }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
with goPackages;
|
||||
|
||||
buildGoPackage rec {
|
||||
version = "0.1.0";
|
||||
name = "flannel-${version}";
|
||||
|
||||
src = import ./deps.nix {
|
||||
inherit stdenv lib fetchFromGitHub;
|
||||
goPackagePath = "github.com/coreos/flannel";
|
||||
src = fetchFromGitHub {
|
||||
owner = "coreos";
|
||||
repo = "flannel";
|
||||
rev = "v${version}";
|
||||
sha256 = "1f7x6a2c8ix6j5y1r0dq56b58bl2rs2ycbdqb9fz5zv1zk2w20rd";
|
||||
};
|
||||
|
||||
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; {
|
||||
meta = with lib; {
|
||||
description = "Flannel is an etcd backed network fabric for containers";
|
||||
homepage = https://github.com/coreos/flannel;
|
||||
license = licenses.asl20;
|
||||
|
||||
Reference in New Issue
Block a user