Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,11 @@ appleDerivation {

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
(cd ${darling.src}/platform-include && (xargs -n1 echo | cpio -pdm --quiet $out/include) <<<"
os/activity.h
os/log.h
os/trace.h
")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/nix/store/pawa4j5ywf0s0mm1khk8f45qx8qrj49v-Libsystem-1238.60.2-osx-10.12.6/include/os/trace.h:32:10: fatal error: 'os/trace_base.h' file not found
#include <os/trace_base.h>
^~~~~~~~~~~~~~~~~

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

@holymonson holymonson Jan 29, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here is a little complicated, os/trace_base.h required os/availability.h (not the one below, a new one), while the new os/availability.h required new Availability.h in xnu according to #110685 (review) . We have to do it step by step to keep minimal change in each PR.

@veprbl would you review #109368 first? Then I will try making a pure xnu update, then darling.


cat <<EOF > $out/include/os/availability.h
#ifndef __OS_AVAILABILITY__
Expand Down
21 changes: 8 additions & 13 deletions pkgs/os-specific/darwin/darling/default.nix
Original file line number Diff line number Diff line change
@@ -1,19 +1,14 @@
{stdenv, lib, fetchzip}:
{ lib, stdenv, fetchFromGitHub }:

stdenv.mkDerivation rec {
pname = "darling";
name = pname;
pname = "darling";
version = "unstable-2020-04-26";

src = fetchzip {
url = "https://github.com/darlinghq/darling/archive/d2cc5fa748003aaa70ad4180fff0a9a85dc65e9b.tar.gz";
sha256 = "11b51fw47nl505h63bgx5kqiyhf3glhp1q6jkpb6nqfislnzzkrf";
postFetch = ''
# Get rid of case conflict
mkdir $out
cd $out
tar -xzf $downloadedFile --strip-components=1
rm -r $out/src/libm
'';
src = fetchFromGitHub {
owner = "darlinghq";
repo = "darling";
rev = "ea5f07d38a0d4667b4fdda42b131250e4b7c7296";
sha256 = "1qnp4fpnjf95pzxn51rmwadnj24llb64pb127yr2qkw35apbz00c";
};

# only packaging sandbox for now
Expand Down