mirror of
https://github.com/nix-community/linuxkit-nix.git
synced 2024-10-05 15:47:33 +03:00
fbfdf1fd80
This fixes a runtime error: a failing assertion that the variable's content is 41 bytes long (40 characters plus a null terminator).
48 lines
1.3 KiB
Nix
48 lines
1.3 KiB
Nix
{ stdenv, lib, fetchFromGitHub, Hypervisor, vmnet, SystemConfiguration, xpc, libobjc, dtrace }:
|
|
|
|
let
|
|
# Make sure to keep those in sync
|
|
version = "0.20180403";
|
|
rev = "06c3cf7ec253534b2d81f61ee3c85c5c9aafa4ee";
|
|
in
|
|
stdenv.mkDerivation rec {
|
|
name = "hyperkit-${version}";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "moby";
|
|
repo = "hyperkit";
|
|
inherit rev;
|
|
sha256 = "0c8fp03b65kk2lnjvg3fbcrnvxryy4f487l5l9r38r3j39aryzc2";
|
|
};
|
|
|
|
buildInputs = [ Hypervisor vmnet SystemConfiguration xpc libobjc dtrace ];
|
|
|
|
# Don't use git to determine version
|
|
prePatch = ''
|
|
substituteInPlace Makefile \
|
|
--replace 'shell git describe --abbrev=6 --dirty --always --tags' "$version" \
|
|
--replace 'shell git rev-parse HEAD' "${rev}" \
|
|
--replace 'PHONY: clean' 'PHONY:'
|
|
make src/include/xhyve/dtrace.h
|
|
'';
|
|
|
|
makeFlags = [
|
|
"CFLAGS+=-Wno-shift-sign-overflow"
|
|
''CFLAGS+=-DVERSION=\"${version}\"''
|
|
''CFLAGS+=-DVERSION_SHA1=\"${rev}\"''
|
|
];
|
|
|
|
installPhase = ''
|
|
mkdir -p $out/bin
|
|
cp build/hyperkit $out/bin
|
|
'';
|
|
|
|
meta = {
|
|
description = "A toolkit for embedding hypervisor capabilities in your application";
|
|
homepage = "https://github.com/moby/hyperkit";
|
|
maintainers = [ lib.maintainers.puffnfresh ];
|
|
platforms = lib.platforms.darwin;
|
|
license = lib.licenses.bsd3;
|
|
};
|
|
}
|