Skip to content

Commit

Permalink
darwin.darling: rename to darwin.darling-sandbox
Browse files Browse the repository at this point in the history
Distinguish this package from Darling,
the emulation layer to run Darwin apps on Linux
  • Loading branch information
ShamrockLee committed Apr 25, 2023
1 parent 87378fb commit becb795
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 10 deletions.
2 changes: 2 additions & 0 deletions nixos/doc/manual/release-notes/rl-2305.section.md
Expand Up @@ -145,6 +145,8 @@ In addition to numerous new and upgraded packages, this release has the followin

- `nushell` has been updated to at least version 0.77.0, which includes potential breaking changes in aliases. The old aliases are now available as `old-alias` but it is recommended you migrate to the new format. See [Reworked aliases](https://www.nushell.sh/blog/2023-03-14-nushell_0_77.html#reworked-aliases-breaking-changes-kubouch).

- The `darwin.darling` package has been renamed to `darwing.darling-sandbox` to distinguish from [Darling](https://github.com/darlinghq/darling), a Darwin emulation layer for Linux. The name `darwin-sandbox` emphasize that it is compiled from the sandbox part of Darling, and is meant to be run directly on Darwin instead of on Linux.

- `keepassx` and `keepassx2` have been removed, due to upstream [stopping development](https://www.keepassx.org/index.html%3Fp=636.html). Consider [KeePassXC](https://keepassxc.org) as a maintained alternative.

- The [services.kubo.settings](#opt-services.kubo.settings) option is now no longer stateful. If you changed any of the options in [services.kubo.settings](#opt-services.kubo.settings) in the past and then removed them from your NixOS configuration again, those changes are still in your Kubo configuration file but will now be reset to the default. If you're unsure, you may want to make a backup of your configuration file (probably /var/lib/ipfs/config) and compare after the update.
Expand Down
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 becb795

Please sign in to comment.