2020-04-24 23:36:52 +00:00
|
|
|
{ stdenv, lib, fetchFromGitHub, Hypervisor, vmnet, xpc, libobjc, zlib }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "xhyve";
|
2021-06-28 23:13:55 +00:00
|
|
|
version = "20210203";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "machyve";
|
|
|
|
repo = "xhyve";
|
2021-06-28 23:13:55 +00:00
|
|
|
rev = "83516a009c692ea5d2993d1071e68d05d359b11e";
|
|
|
|
sha256 = "1pjdg4ppy6qh3vr1ls5zyw3jzcvwny9wydnmfpadwij1hvns7lj3";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ Hypervisor vmnet xpc libobjc zlib ];
|
|
|
|
|
|
|
|
# Don't use git to determine version
|
|
|
|
prePatch = ''
|
|
|
|
substituteInPlace Makefile \
|
|
|
|
--replace 'shell git describe --abbrev=6 --dirty --always --tags' "$version"
|
|
|
|
'';
|
|
|
|
|
|
|
|
|
|
|
|
makeFlags = [ "CFLAGS+=-Wno-shift-sign-overflow" ''CFLAGS+=-DVERSION=\"${version}\"'' ];
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin
|
|
|
|
cp build/xhyve $out/bin
|
|
|
|
'';
|
|
|
|
|
2020-06-18 07:06:33 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Lightweight Virtualization on macOS Based on bhyve";
|
|
|
|
homepage = "https://github.com/mist64/xhyve";
|
2020-06-18 07:06:33 +00:00
|
|
|
maintainers = [ maintainers.lnl7 ];
|
|
|
|
license = licenses.bsd2;
|
|
|
|
platforms = platforms.darwin;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|