darwin.dtrace: Fix failing build

What dtrace needs from the CoreSymbolication private framework on Darwin
is provided in Nixpkgs by two different packages, but both of their full
attribute paths end in CoreSymbolication.

This commit therefore does two things:
- adds the second CoreSymbolication package to dtrace's dependencies;
  and
- adds an alias for the second CoreSymbolication package to avoid
  having to explicitly name or rename it when calling the dtrace
  package in the existing contexts.
This commit is contained in:
Boey Maun Suang 2023-01-27 12:47:22 +11:00
parent 2b175a1e0f
commit fbaface6ff

View File

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