2018-04-08 07:41:15 +02:00
|
|
|
{stdenv, lib, fetchFromGitHub, cmake, bison, flex}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "darling";
|
|
|
|
name = pname;
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
repo = pname;
|
|
|
|
owner = "darlinghq";
|
|
|
|
rev = "d2cc5fa748003aaa70ad4180fff0a9a85dc65e9b";
|
2018-04-16 06:22:12 +02:00
|
|
|
sha256 = "1sdl0ysa3yfdvkq0x7vkdl64g7mcfy3qx70saf1d8rnhycbxjgjg";
|
2018-04-08 07:41:15 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
# only packaging sandbox for now
|
|
|
|
buildPhase = ''
|
|
|
|
cc -c src/sandbox/sandbox.c -o src/sandbox/sandbox.o
|
|
|
|
cc -dynamiclib -flat_namespace src/sandbox/sandbox.o -o libsystem_sandbox.dylib
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/lib
|
|
|
|
cp -rL src/sandbox/include/ $out/
|
|
|
|
cp libsystem_sandbox.dylib $out/lib/
|
|
|
|
'';
|
|
|
|
|
|
|
|
# buildInputs = [ cmake bison flex ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
maintainers = with maintainers; [ matthewbauer ];
|
|
|
|
license = licenses.gpl3;
|
|
|
|
description = "Darwin/macOS emulation layer for Linux";
|
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|