2019-12-10 11:00:39 +00:00
|
|
|
{ stdenv, buildGoPackage, fetchFromGitHub, pkgconfig, cctools, Hypervisor, vmnet }:
|
2017-11-20 19:06:29 +00:00
|
|
|
|
|
|
|
buildGoPackage rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "docker-machine-xhyve";
|
2019-12-10 10:57:20 +00:00
|
|
|
version = "0.4.0";
|
2017-11-20 19:06:29 +00:00
|
|
|
|
|
|
|
goPackagePath = "github.com/zchee/docker-machine-driver-xhyve";
|
|
|
|
|
2019-12-10 11:00:39 +00:00
|
|
|
preBuild = ''
|
|
|
|
make -C go/src/${goPackagePath} CC=${stdenv.cc}/bin/cc LIBTOOL=${cctools}/bin/libtool GIT_CMD=: lib9p
|
|
|
|
export CGO_CFLAGS=-I$(pwd)/go/src/${goPackagePath}/vendor/github.com/jceel/lib9p
|
|
|
|
export CGO_LDFLAGS=$(pwd)/go/src/${goPackagePath}/vendor/build/lib9p/lib9p.a
|
|
|
|
'';
|
|
|
|
buildFlags = "--tags lib9p";
|
|
|
|
|
2017-11-20 19:06:29 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
rev = "v${version}";
|
2019-12-10 10:55:52 +00:00
|
|
|
owner = "machine-drivers";
|
2017-11-20 19:06:29 +00:00
|
|
|
repo = "docker-machine-driver-xhyve";
|
2019-12-10 10:57:20 +00:00
|
|
|
sha256 = "0000v97fr8xc5b39v44hsa87wrbk4bcwyaaivxv4hxlf4vlgg863";
|
2017-11-20 19:06:29 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ pkgconfig ];
|
|
|
|
buildInputs = [ Hypervisor vmnet ];
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
2019-12-10 10:55:52 +00:00
|
|
|
homepage = https://github.com/machine-drivers/docker-machine-driver-xhyve;
|
2017-11-20 19:06:29 +00:00
|
|
|
description = "Xhyve driver for docker-machine.";
|
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ periklis ];
|
|
|
|
platforms = platforms.darwin;
|
|
|
|
};
|
|
|
|
}
|