2018-12-07 21:14:03 +00:00
|
|
|
{ stdenv, lib, fetchFromGitHub, go, removeReferencesTo }:
|
2018-03-17 05:35:35 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-06-01 08:02:41 +01:00
|
|
|
pname = "cni-plugins";
|
2019-06-09 21:29:31 +01:00
|
|
|
version = "0.8.1";
|
2018-03-17 05:35:35 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "containernetworking";
|
|
|
|
repo = "plugins";
|
|
|
|
rev = "v${version}";
|
2019-06-09 21:29:31 +01:00
|
|
|
sha256 = "07d8knnabfjipzvcqbq7h8gd940lln934xp57nf5x31d3hpmvzws";
|
2018-03-17 05:35:35 +00:00
|
|
|
};
|
|
|
|
|
2018-12-07 21:14:03 +00:00
|
|
|
buildInputs = [ removeReferencesTo go ];
|
|
|
|
|
2018-03-17 05:35:35 +00:00
|
|
|
buildPhase = ''
|
2019-06-01 08:02:41 +01:00
|
|
|
patchShebangs build_linux.sh
|
2019-02-28 01:46:32 +00:00
|
|
|
export "GOCACHE=$TMPDIR/go-cache"
|
2019-06-01 08:02:41 +01:00
|
|
|
./build_linux.sh
|
2018-03-17 05:35:35 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin
|
|
|
|
mv bin/* $out/bin
|
|
|
|
'';
|
|
|
|
|
2018-12-07 21:14:03 +00:00
|
|
|
preFixup = ''
|
|
|
|
find $out/bin -type f -exec remove-references-to -t ${go} '{}' +
|
|
|
|
'';
|
|
|
|
|
2018-03-17 05:35:35 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Some standard networking plugins, maintained by the CNI team";
|
|
|
|
homepage = https://github.com/containernetworking/plugins;
|
|
|
|
license = licenses.asl20;
|
|
|
|
platforms = [ "x86_64-linux" ];
|
|
|
|
maintainers = with maintainers; [ cstrahan ];
|
|
|
|
};
|
|
|
|
}
|