nixpkgs-suyu/pkgs/applications/virtualization/xhyve/default.nix
davidak 3270aa896b replace "Mac OS X" and "OS X" with "macOS"
as it is the official name since 2016

https://en.wikipedia.org/wiki/Macintosh_operating_systems#Desktop

exception are parts refering to older versions of macOS like

"GUI support for Mac OS X 10.6 - 10.12. Note that Emacs 23 and later [...]"
2017-08-07 21:41:30 +02:00

34 lines
962 B
Nix

{ stdenv, lib, fetchurl, Hypervisor, vmnet, xpc, libobjc }:
stdenv.mkDerivation rec {
name = "xhyve-${version}";
version = "1f1dbe305";
src = fetchurl {
url = "https://github.com/mist64/xhyve/archive/1f1dbe3059904f885e4ab2b3328f4bb350ea5c37.tar.gz";
sha256 = "0hfix8yr90szlv2yyqb2rlq5qsrxyam8kg52sly0adja0cpwfjvx";
};
buildInputs = [ Hypervisor vmnet xpc libobjc ];
# 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
'';
meta = {
description = "Lightweight Virtualization on macOS Based on bhyve";
homepage = https://github.com/mist64/xhyve;
maintainers = [ lib.maintainers.lnl7 ];
platforms = lib.platforms.darwin;
};
}