2017-03-15 02:38:35 +00:00
|
|
|
{ stdenv, lib, fetchurl, Hypervisor, vmnet, xpc, libobjc }:
|
2015-07-05 14:03:01 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2017-03-15 02:38:35 +00:00
|
|
|
name = "xhyve-${version}";
|
|
|
|
version = "1f1dbe305";
|
2015-07-05 14:03:01 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2017-03-15 02:38:35 +00:00
|
|
|
url = "https://github.com/mist64/xhyve/archive/1f1dbe3059904f885e4ab2b3328f4bb350ea5c37.tar.gz";
|
|
|
|
sha256 = "0hfix8yr90szlv2yyqb2rlq5qsrxyam8kg52sly0adja0cpwfjvx";
|
2015-07-05 14:03:01 +00:00
|
|
|
};
|
|
|
|
|
2017-03-15 02:38:35 +00:00
|
|
|
buildInputs = [ Hypervisor vmnet xpc libobjc ];
|
|
|
|
|
2015-09-17 11:27:12 +00: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 11:27:12 +00:00
|
|
|
'';
|
2015-07-05 14:03:01 +00:00
|
|
|
|
2017-03-15 02:38:35 +00:00
|
|
|
|
|
|
|
makeFlags = [ "CFLAGS+=-Wno-shift-sign-overflow" ''CFLAGS+=-DVERSION=\"${version}\"'' ];
|
|
|
|
|
2015-07-05 14:03:01 +00:00
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin
|
|
|
|
cp build/xhyve $out/bin
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Lightweight Virtualization on OS X Based on bhyve";
|
|
|
|
homepage = "https://github.com/mist64/xhyve";
|
2015-09-17 13:32:50 +00:00
|
|
|
maintainers = [ lib.maintainers.lnl7 ];
|
2015-07-05 14:03:01 +00:00
|
|
|
platforms = lib.platforms.darwin;
|
|
|
|
};
|
|
|
|
}
|