about summary refs log tree commit diff
path: root/pkgs/applications/networking/cluster/docker-machine
diff options
context:
space:
mode:
authorMichael Roitzsch <reactorcontrol@icloud.com>2019-12-10 12:00:39 +0100
committerMichael Roitzsch <reactorcontrol@icloud.com>2019-12-21 19:48:40 +0100
commit08ecf22b0332de05b6b2290ef4bdac2e2ce10f34 (patch)
treece8ab43743a5adabfac03b6a0256b12f7602f044 /pkgs/applications/networking/cluster/docker-machine
parent475bf6d2a5f3ba2e4c3d2b31b6e54f26e1aa7163 (diff)
docker-machine-xhyve: support lib9p shared file system
The lib9p library for host-guest file sharing in xhyve needs to be built separately.
Diffstat (limited to 'pkgs/applications/networking/cluster/docker-machine')
-rw-r--r--pkgs/applications/networking/cluster/docker-machine/xhyve.nix9
1 files changed, 8 insertions, 1 deletions
diff --git a/pkgs/applications/networking/cluster/docker-machine/xhyve.nix b/pkgs/applications/networking/cluster/docker-machine/xhyve.nix
index d448d4ae8e795..f9c7fbf606554 100644
--- a/pkgs/applications/networking/cluster/docker-machine/xhyve.nix
+++ b/pkgs/applications/networking/cluster/docker-machine/xhyve.nix
@@ -1,4 +1,4 @@
-{ stdenv, buildGoPackage, fetchFromGitHub, pkgconfig, Hypervisor, vmnet }:
+{ stdenv, buildGoPackage, fetchFromGitHub, pkgconfig, cctools, Hypervisor, vmnet }:
 
 buildGoPackage rec {
   pname = "docker-machine-xhyve";
@@ -6,6 +6,13 @@ buildGoPackage rec {
 
   goPackagePath = "github.com/zchee/docker-machine-driver-xhyve";
 
+  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";
+
   src = fetchFromGitHub {
     rev    = "v${version}";
     owner  = "machine-drivers";