2017-01-17 15:49:32 +01:00
|
|
|
{ stdenv, lib, fetchFromGitHub, go, docker }:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "docker-proxy-${rev}";
|
2017-05-09 10:11:05 +02:00
|
|
|
rev = "7b2b1feb1de4817d522cc372af149ff48d25028e";
|
2017-01-17 15:49:32 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
inherit rev;
|
|
|
|
owner = "docker";
|
|
|
|
repo = "libnetwork";
|
2017-05-09 10:11:05 +02:00
|
|
|
sha256 = "1ng577k11cyv207bp0vaz5jjfcn2igd6w95zn4izcq1nldzp5935";
|
2017-01-17 15:49:32 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ go ];
|
|
|
|
|
|
|
|
buildPhase = ''
|
|
|
|
mkdir -p .gopath/src/github.com/docker
|
|
|
|
ln -sf $(pwd) .gopath/src/github.com/docker/libnetwork
|
|
|
|
GOPATH="$(pwd)/.gopath:$(pwd)/Godeps/_workspace" go build -ldflags="$PROXY_LDFLAGS" -o docker-proxy ./cmd/proxy
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin
|
|
|
|
cp docker-proxy $out/bin
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Docker proxy binary to forward traffic between host and containers";
|
|
|
|
license = licenses.asl20;
|
|
|
|
homepage = https://github.com/docker/libnetwork;
|
|
|
|
maintainers = with maintainers; [vdemeester];
|
|
|
|
platforms = docker.meta.platforms;
|
|
|
|
};
|
|
|
|
}
|