Skip to content

Commit

Permalink
darwin.darling: rename to darwin.darling-sandbox
Browse files Browse the repository at this point in the history
This is to avoid confusion between this package and
darling, the emulation layer to run Darwin apps on Linux
  • Loading branch information
ShamrockLee committed Apr 25, 2023
1 parent 87378fb commit af00749
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
Expand Up @@ -2,7 +2,7 @@
, appleDerivation', xnu, Libc, Libm, libdispatch, Libinfo
, dyld, Csu, architecture, libclosure, CarbonHeaders, ncurses, CommonCrypto
, copyfile, removefile, libresolvHeaders, libresolv, Libnotify, libplatform, libpthread
, mDNSResponder, launchd, libutilHeaders, hfsHeaders, darling, darwin-stubs
, mDNSResponder, launchd, libutilHeaders, hfsHeaders, darling-sandbox, darwin-stubs
, headersOnly ? false
, withLibresolv ? !headersOnly
}:
Expand Down Expand Up @@ -41,9 +41,9 @@ appleDerivation' stdenv {
mkdir -p $out/include/os
cp ${darling.src}/src/libc/os/activity.h $out/include/os
cp ${darling.src}/src/libc/os/log.h $out/include/os
cp ${darling.src}/src/duct/include/os/trace.h $out/include/os
cp ${darling-sandbox.src}/src/libc/os/activity.h $out/include/os
cp ${darling-sandbox.src}/src/libc/os/log.h $out/include/os
cp ${darling-sandbox.src}/src/duct/include/os/trace.h $out/include/os
cat <<EOF > $out/include/os/availability.h
#ifndef __OS_AVAILABILITY__
Expand Down
Expand Up @@ -2,7 +2,7 @@

appleDerivation {
nativeBuildInputs = [ xcbuildHook dtrace ];
# buildInputs = [ Foundation xpc darling ];
# buildInputs = [ Foundation xpc darling-sandbox ];
buildInputs = [ xpc xnu ];

xcbuildFlags = [ "-target" "Security_frameworks_osx" ];
Expand Down
@@ -1,9 +1,9 @@
{ appleDerivation, xcbuildHook, CoreSymbolication, apple_sdk
, xnu, bison, flex, darling, stdenv, fixDarwinDylibNames }:
, xnu, bison, flex, darling-sandbox, stdenv, fixDarwinDylibNames }:

appleDerivation {
nativeBuildInputs = [ xcbuildHook flex bison fixDarwinDylibNames ];
buildInputs = [ CoreSymbolication apple_sdk.frameworks.CoreSymbolication darling xnu ];
buildInputs = [ CoreSymbolication apple_sdk.frameworks.CoreSymbolication darling-sandbox xnu ];
# -fcommon: workaround build failure on -fno-common toolchains:
# duplicate symbol '_kCSRegionMachHeaderName' in: libproc.o dt_module_apple.o
env.NIX_CFLAGS_COMPILE = "-DCTF_OLD_VERSIONS -DPRIVATE -DYYDEBUG=1 -I${xnu}/Library/Frameworks/System.framework/Headers -Wno-error=implicit-function-declaration -fcommon";
Expand Down
@@ -1,7 +1,7 @@
{stdenv, lib, fetchzip}:

stdenv.mkDerivation rec {
pname = "darling";
pname = "darling-sandbox";
name = pname;

src = fetchzip {
Expand Down Expand Up @@ -45,7 +45,7 @@ stdenv.mkDerivation rec {
meta = with lib; {
maintainers = with maintainers; [ matthewbauer ];
license = licenses.gpl3;
description = "Darwin/macOS emulation layer for Linux";
description = "The sandbox part of Darling, a Darwin/macOS emulation layer for Linux";
platforms = platforms.darwin;
};
}
2 changes: 1 addition & 1 deletion pkgs/top-level/darwin-packages.nix
Expand Up @@ -216,7 +216,7 @@ impure-cmds // appleSourcePackages // chooseLibs // {
# As the name says, this is broken, but I don't want to lose it since it's a direction we want to go in
# libdispatch-broken = callPackage ../os-specific/darwin/swift-corelibs/libdispatch.nix { };

darling = callPackage ../os-specific/darwin/darling/default.nix { };
darling-sandbox = callPackage ../os-specific/darwin/darling-sandbox/default.nix { };

libtapi = callPackage ../os-specific/darwin/libtapi {};

Expand Down

0 comments on commit af00749

Please sign in to comment.