Port flannel to buildGoPackage

This commit is contained in:
Luca Bruno
2015-02-04 15:56:40 +01:00
parent 8fd42c55a9
commit 040d475103
2 changed files with 11 additions and 46 deletions
+11 -18
View File
@@ -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;