2018-12-20 08:22:13 +01:00
|
|
|
{ stdenv, fetchFromGitHub, buildGoPackage }:
|
2016-11-16 16:29:35 +01:00
|
|
|
|
2018-12-20 08:22:13 +01:00
|
|
|
buildGoPackage rec {
|
2016-11-16 16:29:35 +01:00
|
|
|
name = "cni-${version}";
|
2018-03-08 09:48:25 +01:00
|
|
|
version = "0.6.0";
|
2016-11-16 16:29:35 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "containernetworking";
|
|
|
|
repo = "cni";
|
|
|
|
rev = "v${version}";
|
2018-03-08 09:48:25 +01:00
|
|
|
sha256 = "00ajs2r5r2z3l0vqwxrcwhjfc9px12qbcv5vnvs2mdipvvls1y2y";
|
2016-11-16 16:29:35 +01:00
|
|
|
};
|
|
|
|
|
2018-12-20 08:22:13 +01:00
|
|
|
goPackagePath = "github.com/containernetworking/cni";
|
2016-11-16 16:29:35 +01:00
|
|
|
|
|
|
|
buildPhase = ''
|
2018-12-20 08:22:13 +01:00
|
|
|
cd "go/src/${goPackagePath}"
|
2017-09-01 12:34:46 +02:00
|
|
|
patchShebangs build.sh
|
|
|
|
./build.sh
|
2016-11-16 16:29:35 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
2018-12-20 08:22:13 +01:00
|
|
|
install -Dm555 bin/cnitool $bin/bin/cnitool
|
2018-12-07 22:13:42 +01:00
|
|
|
'';
|
|
|
|
|
2016-11-16 16:29:35 +01:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Container Network Interface - networking for Linux containers";
|
|
|
|
license = licenses.asl20;
|
|
|
|
homepage = https://github.com/containernetworking/cni;
|
2018-12-20 08:22:13 +01:00
|
|
|
maintainers = with maintainers; [ offline vdemeester ];
|
2016-11-16 16:29:35 +01:00
|
|
|
platforms = [ "x86_64-linux" ];
|
|
|
|
};
|
|
|
|
}
|