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/default.nix

40 lines
898 B
Nix
Raw Normal View History

2018-12-07 21:13:42 +00:00
{ stdenv, fetchFromGitHub, go, removeReferencesTo }:
stdenv.mkDerivation rec {
name = "cni-${version}";
version = "0.6.0";
src = fetchFromGitHub {
owner = "containernetworking";
repo = "cni";
rev = "v${version}";
sha256 = "00ajs2r5r2z3l0vqwxrcwhjfc9px12qbcv5vnvs2mdipvvls1y2y";
};
2018-12-07 21:13:42 +00:00
buildInputs = [ removeReferencesTo go ];
GOCACHE = "off";
buildPhase = ''
2017-09-01 11:34:46 +01:00
patchShebangs build.sh
./build.sh
'';
installPhase = ''
mkdir -p $out/bin
mv bin/cnitool $out/bin
'';
2018-12-07 21:13:42 +00:00
preFixup = ''
find $out/bin -type f -exec remove-references-to -t ${go} '{}' +
'';
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" ];
};
}