2019-10-23 20:10:18 +02:00
|
|
|
{ stdenv, lib, fetchFromGitHub, Hypervisor, vmnet, xpc, libobjc, zlib }:
|
2015-07-05 16:03:01 +02:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "xhyve";
|
2021-06-18 22:14:52 +02:00
|
|
|
version = "20210203";
|
2015-07-05 16:03:01 +02:00
|
|
|
|
2019-10-23 20:10:18 +02:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "machyve";
|
|
|
|
repo = "xhyve";
|
2021-06-18 22:14:52 +02:00
|
|
|
rev = "83516a009c692ea5d2993d1071e68d05d359b11e";
|
|
|
|
sha256 = "1pjdg4ppy6qh3vr1ls5zyw3jzcvwny9wydnmfpadwij1hvns7lj3";
|
2015-07-05 16:03:01 +02:00
|
|
|
};
|
|
|
|
|
2019-02-15 23:10:19 +01:00
|
|
|
buildInputs = [ Hypervisor vmnet xpc libobjc zlib ];
|
2017-03-15 03:38:35 +01:00
|
|
|
|
2015-09-17 13:27:12 +02:00
|
|
|
# Don't use git to determine version
|
2017-03-15 03:38:35 +01:00
|
|
|
prePatch = ''
|
|
|
|
substituteInPlace Makefile \
|
|
|
|
--replace 'shell git describe --abbrev=6 --dirty --always --tags' "$version"
|
2015-09-17 13:27:12 +02:00
|
|
|
'';
|
2015-07-05 16:03:01 +02:00
|
|
|
|
2017-03-15 03:38:35 +01:00
|
|
|
|
|
|
|
makeFlags = [ "CFLAGS+=-Wno-shift-sign-overflow" ''CFLAGS+=-DVERSION=\"${version}\"'' ];
|
|
|
|
|
2015-07-05 16:03:01 +02:00
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin
|
|
|
|
cp build/xhyve $out/bin
|
|
|
|
'';
|
|
|
|
|
2020-06-11 17:43:47 +02:00
|
|
|
meta = with lib; {
|
2017-08-07 00:05:18 +02:00
|
|
|
description = "Lightweight Virtualization on macOS Based on bhyve";
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://github.com/mist64/xhyve";
|
2020-06-11 17:43:47 +02:00
|
|
|
maintainers = [ maintainers.lnl7 ];
|
|
|
|
license = licenses.bsd2;
|
|
|
|
platforms = platforms.darwin;
|
2015-07-05 16:03:01 +02:00
|
|
|
};
|
|
|
|
}
|