nixpkgs/pkgs/applications/virtualization/xhyve/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

40 lines
1.1 KiB
Nix
Raw Normal View History

2019-10-23 21:10:18 +03:00
{ stdenv, lib, fetchFromGitHub, Hypervisor, vmnet, xpc, libobjc, zlib }:
stdenv.mkDerivation rec {
pname = "xhyve";
version = "20210203";
2019-10-23 21:10:18 +03:00
src = fetchFromGitHub {
owner = "machyve";
repo = "xhyve";
rev = "83516a009c692ea5d2993d1071e68d05d359b11e";
sha256 = "1pjdg4ppy6qh3vr1ls5zyw3jzcvwny9wydnmfpadwij1hvns7lj3";
};
2019-02-16 01:10:19 +03:00
buildInputs = [ Hypervisor vmnet xpc libobjc zlib ];
2015-09-17 14:27:12 +03:00
# Don't use git to determine version
prePatch = ''
substituteInPlace Makefile \
--replace 'shell git describe --abbrev=6 --dirty --always --tags' "$version"
2015-09-17 14:27:12 +03:00
'';
makeFlags = [ "CFLAGS+=-Wno-shift-sign-overflow" ''CFLAGS+=-DVERSION=\"${version}\"'' ];
installPhase = ''
mkdir -p $out/bin
cp build/xhyve $out/bin
'';
2020-06-11 18:43:47 +03:00
meta = with lib; {
description = "Lightweight Virtualization on macOS Based on bhyve";
homepage = "https://github.com/mist64/xhyve";
2020-06-11 18:43:47 +03:00
maintainers = [ maintainers.lnl7 ];
license = licenses.bsd2;
platforms = platforms.darwin;
# never built on aarch64-darwin since first introduction in nixpkgs
broken = stdenv.isDarwin && stdenv.isAarch64;
};
}