blob: fb36d3729c05b5f0bdf8074ae430a3108d43e91a (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
{ stdenv, lib, fetchFromGitHub, go, removeReferencesTo }:
stdenv.mkDerivation rec {
pname = "cni-plugins";
version = "0.8.1";
src = fetchFromGitHub {
owner = "containernetworking";
repo = "plugins";
rev = "v${version}";
sha256 = "07d8knnabfjipzvcqbq7h8gd940lln934xp57nf5x31d3hpmvzws";
};
buildInputs = [ removeReferencesTo go ];
buildPhase = ''
patchShebangs build_linux.sh
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 ];
};
}
|