diff options
author | Matthew Bauer <mjbauer95@gmail.com> | 2018-04-08 00:41:15 -0500 |
---|---|---|
committer | Matthew Bauer <mjbauer95@gmail.com> | 2018-04-09 18:35:35 -0500 |
commit | 0b833261727ff8c36e3c51eab8f522747198429a (patch) | |
tree | e0cc2051308c93f0006876111608398018798721 /pkgs/os-specific/darwin/darling/default.nix | |
parent | d625fece188feb5c58dc857af1cb64d5be24d03e (diff) | |
download | nixpkgs-0b833261727ff8c36e3c51eab8f522747198429a.tar nixpkgs-0b833261727ff8c36e3c51eab8f522747198429a.tar.gz nixpkgs-0b833261727ff8c36e3c51eab8f522747198429a.tar.bz2 nixpkgs-0b833261727ff8c36e3c51eab8f522747198429a.tar.lz nixpkgs-0b833261727ff8c36e3c51eab8f522747198429a.tar.xz nixpkgs-0b833261727ff8c36e3c51eab8f522747198429a.tar.zst nixpkgs-0b833261727ff8c36e3c51eab8f522747198429a.zip |
darling: init
Diffstat (limited to 'pkgs/os-specific/darwin/darling/default.nix')
-rw-r--r-- | pkgs/os-specific/darwin/darling/default.nix | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/pkgs/os-specific/darwin/darling/default.nix b/pkgs/os-specific/darwin/darling/default.nix new file mode 100644 index 00000000000..8c94b2d878d --- /dev/null +++ b/pkgs/os-specific/darwin/darling/default.nix @@ -0,0 +1,34 @@ +{stdenv, lib, fetchFromGitHub, cmake, bison, flex}: + +stdenv.mkDerivation rec { + pname = "darling"; + name = pname; + + src = fetchFromGitHub { + repo = pname; + owner = "darlinghq"; + rev = "d2cc5fa748003aaa70ad4180fff0a9a85dc65e9b"; + sha256 = "1mkcnzy1cfpwghgvb9pszhy9jy6534y8krw8inwl9fqfd0w019wz"; + }; + + # 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; + }; +} |