2019-02-15 22:10:19 +00:00
|
|
|
{ stdenv, lib, fetchurl, Hypervisor, vmnet, xpc, libobjc, zlib }:
|
2015-07-05 15:03:01 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2017-03-15 02:38:35 +00:00
|
|
|
name = "xhyve-${version}";
|
2019-02-15 22:10:19 +00:00
|
|
|
version = "20190124";
|
2015-07-05 15:03:01 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2019-02-15 22:10:19 +00:00
|
|
|
url = "https://github.com/machyve/xhyve/archive/1dd9a5165848c7ed56dafc41932c553ea56a12af.tar.gz";
|
|
|
|
sha256 = "18zd74pd0azf43csbqb14srbyclfgx28dpgm8ygjmbcazbnipc1k";
|
2015-07-05 15:03:01 +01:00
|
|
|
};
|
|
|
|
|
2019-02-15 22:10:19 +00:00
|
|
|
buildInputs = [ Hypervisor vmnet xpc libobjc zlib ];
|
2017-03-15 02:38:35 +00:00
|
|
|
|
2015-09-17 12:27:12 +01:00
|
|
|
# Don't use git to determine version
|
2017-03-15 02:38:35 +00:00
|
|
|
prePatch = ''
|
|
|
|
substituteInPlace Makefile \
|
|
|
|
--replace 'shell git describe --abbrev=6 --dirty --always --tags' "$version"
|
2015-09-17 12:27:12 +01:00
|
|
|
'';
|
2015-07-05 15:03:01 +01:00
|
|
|
|
2017-03-15 02:38:35 +00:00
|
|
|
|
|
|
|
makeFlags = [ "CFLAGS+=-Wno-shift-sign-overflow" ''CFLAGS+=-DVERSION=\"${version}\"'' ];
|
|
|
|
|
2015-07-05 15:03:01 +01:00
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin
|
|
|
|
cp build/xhyve $out/bin
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
2017-08-06 23:05:18 +01:00
|
|
|
description = "Lightweight Virtualization on macOS Based on bhyve";
|
2017-08-01 21:03:30 +01:00
|
|
|
homepage = https://github.com/mist64/xhyve;
|
2015-09-17 14:32:50 +01:00
|
|
|
maintainers = [ lib.maintainers.lnl7 ];
|
2015-07-05 15:03:01 +01:00
|
|
|
platforms = lib.platforms.darwin;
|
|
|
|
};
|
|
|
|
}
|