3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/applications/networking/cluster/cni/plugins.nix

39 lines
928 B
Nix
Raw Normal View History

{ stdenv, lib, fetchFromGitHub, go, removeReferencesTo }:
stdenv.mkDerivation rec {
pname = "cni-plugins";
2019-06-09 21:29:31 +01:00
version = "0.8.1";
src = fetchFromGitHub {
owner = "containernetworking";
repo = "plugins";
rev = "v${version}";
2019-06-09 21:29:31 +01:00
sha256 = "07d8knnabfjipzvcqbq7h8gd940lln934xp57nf5x31d3hpmvzws";
};
buildInputs = [ removeReferencesTo go ];
buildPhase = ''
patchShebangs build_linux.sh
2019-02-28 01:46:32 +00:00
export "GOCACHE=$TMPDIR/go-cache"
./build_linux.sh
'';
installPhase = ''
mkdir -p $out/bin
mv bin/* $out/bin
'';
preFixup = ''
find $out/bin -type f -exec remove-references-to -t ${go} '{}' +
'';
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 ];
};
}