2016-11-16 15:29:35 +00:00
|
|
|
{ stdenv, fetchFromGitHub, go }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "cni-${version}";
|
2017-09-01 11:34:46 +01:00
|
|
|
version = "0.5.2";
|
2016-11-16 15:29:35 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "containernetworking";
|
|
|
|
repo = "cni";
|
|
|
|
rev = "v${version}";
|
2017-09-01 11:34:46 +01:00
|
|
|
sha256 = "0n2sc5xf1h0i54am80kj7imrvawddn0kxvgi65w0194dpmyrg5al";
|
2016-11-16 15:29:35 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ go ];
|
|
|
|
|
|
|
|
outputs = ["out" "plugins"];
|
|
|
|
|
|
|
|
buildPhase = ''
|
2017-09-01 11:34:46 +01:00
|
|
|
patchShebangs build.sh
|
|
|
|
./build.sh
|
2016-11-16 15:29:35 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin $plugins
|
|
|
|
mv bin/cnitool $out/bin
|
|
|
|
mv bin/* $plugins/
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Container Network Interface - networking for Linux containers";
|
|
|
|
license = licenses.asl20;
|
|
|
|
homepage = https://github.com/containernetworking/cni;
|
|
|
|
maintainers = with maintainers; [offline];
|
|
|
|
platforms = [ "x86_64-linux" ];
|
|
|
|
};
|
|
|
|
}
|