2021-01-17 02:09:27 +00:00
|
|
|
{ lib, stdenv, buildGoPackage, fetchFromGitHub, fetchpatch, pkg-config, cctools, Hypervisor, vmnet }:
|
2017-11-20 19:06:29 +00:00
|
|
|
|
|
|
|
buildGoPackage rec {
|
2019-08-15 12:41:18 +00: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:02:28 +00:00
|
|
|
# https://github.com/machine-drivers/docker-machine-driver-xhyve/pull/225
|
|
|
|
patches = fetchpatch {
|
|
|
|
url = "https://github.com/machine-drivers/docker-machine-driver-xhyve/commit/546256494bf2ccc33e4125bf45f504b0e3027d5a.patch";
|
|
|
|
sha256 = "1i8wxqccqkxvqrbsyd0g9s0kdskd8xi2jv0c1bji9aj4rq0a8cgz";
|
|
|
|
};
|
|
|
|
|
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
|
|
|
|
'';
|
2021-08-20 07:12:13 +00:00
|
|
|
tags = [ "lib9p" ];
|
2019-12-10 11:00:39 +00:00
|
|
|
|
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
|
|
|
};
|
|
|
|
|
2021-01-17 02:09:27 +00:00
|
|
|
nativeBuildInputs = [ pkg-config ];
|
2017-11-20 19:06:29 +00:00
|
|
|
buildInputs = [ Hypervisor vmnet ];
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://github.com/machine-drivers/docker-machine-driver-xhyve";
|
2020-10-11 05:55:05 +00:00
|
|
|
description = "Xhyve driver for docker-machine";
|
2017-11-20 19:06:29 +00:00
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ periklis ];
|
|
|
|
platforms = platforms.darwin;
|
2022-12-06 20:47:40 +00:00
|
|
|
# never built on aarch64-darwin since first introduction in nixpkgs
|
|
|
|
broken = stdenv.isDarwin && stdenv.isAarch64;
|
2017-11-20 19:06:29 +00:00
|
|
|
};
|
|
|
|
}
|