1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-25 03:17:13 +00:00
nixpkgs/pkgs/applications/networking/cluster/cni/plugins.nix
2019-03-02 14:24:17 -08:00

39 lines
926 B
Nix

{ stdenv, lib, fetchFromGitHub, go, removeReferencesTo }:
stdenv.mkDerivation rec {
name = "cni-plugins-${version}";
version = "0.7.4";
src = fetchFromGitHub {
owner = "containernetworking";
repo = "plugins";
rev = "v${version}";
sha256 = "1sywllwnr6lc812sgkqjdd3y10r82shl88dlnwgnbgzs738q2vp2";
};
buildInputs = [ removeReferencesTo go ];
buildPhase = ''
patchShebangs build.sh
export "GOCACHE=$TMPDIR/go-cache"
./build.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 ];
};
}