push sheeet
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s

This commit is contained in:
Dark Steveneq
2025-10-09 14:15:47 +02:00
commit 646b892680
49168 changed files with 5897842 additions and 0 deletions

View File

@@ -0,0 +1,75 @@
# Build settings based on the upstream Xcode project.
# See: https://github.com/apple-oss-distributions/IOKitTools/blob/main/IOKitTools.xcodeproj/project.pbxproj
# Project settings
project('IOKitTools', 'c', version : '@version@')
# Dependencies
cc = meson.get_compiler('c')
ncurses = dependency('ncurses')
core_foundation = dependency('appleframeworks', modules : 'CoreFoundation')
iokit = dependency('appleframeworks', modules : 'IOKit')
core_symbolication = dependency('appleframeworks', modules : 'CoreSymbolication')
perfdata = dependency('appleframeworks', modules : 'perfdata')
# Compatibility tests
iomainport_test = '''
#include <IOKit/IOKit.h>
int main(int argc, char* argv[]) {
const mach_port_t port = kIOMasterPortDefault;
}
'''
if not cc.compiles(iomainport_test, name : 'supports IOMainPort', dependencies : [ iokit ])
add_project_arguments(
'-DIOMainPort=IOMasterPort',
'-DkIOMainPortDefault=kIOMasterPortDefault',
language : 'c'
)
message('Redefining IOMainPort to IOMasterPort.')
endif
kiouserclasseskey_test = '''
#include <IOKit/IOKit.h>
int main(int argc, char* argv[]) {
const char* key = kIOUserClassesKey;
}
'''
if not cc.compiles(iomainport_test, name : 'supports IOUserClasses', dependencies : [ iokit ])
add_project_arguments(
'-DkIOUserClassesKey="IOUserClasses"',
language : 'c'
)
message('Manually defining IOUserClasses constants.')
endif
# Binaries
executable(
'ioalloccount',
dependencies : [ core_foundation, iokit ],
install : true,
sources : [ 'ioalloccount.tproj/ioalloccount.c' ],
)
install_man('ioalloccount.tproj/ioalloccount.8')
executable(
'ioclasscount',
dependencies : [ core_foundation, core_symbolication, iokit, perfdata ],
install : true,
sources : [ 'ioclasscount.tproj/ioclasscount.c' ],
)
install_man('ioclasscount.tproj/ioclasscount.8')
executable(
'ioreg',
dependencies : [ core_foundation, iokit, ncurses ],
install : true,
sources : [ 'ioreg.tproj/ioreg.c' ],
)
install_man('ioreg.tproj/ioreg.8')

View File

@@ -0,0 +1,61 @@
{
lib,
apple-sdk,
mkAppleDerivation,
ncurses,
pkg-config,
stdenvNoCC,
}:
let
iokitUser = apple-sdk.sourceRelease "IOKitUser";
xnu = apple-sdk.sourceRelease "xnu";
privateHeaders = stdenvNoCC.mkDerivation {
name = "IOKitTools-deps-private-headers";
buildCommand = ''
install -D -t "$out/include/IOKit/" \
'${iokitUser}/IOKitLibPrivate.h' \
'${xnu}/iokit/IOKit/IOKitKeysPrivate.h'
install -D -t "$out/include/Kernel/libkern" \
'${xnu}/libkern/libkern/OSKextLibPrivate.h'
mkdir -p "$out/include/perfdata"
cat <<EOF > "$out/include/perfdata/perfdata.h"
#pragma once
typedef void* pdunit_t;
#define PDUNIT_CUSTOM(x) ((void*)("#\"" x "\""))
extern const pdunit_t pdunit_B;
typedef void* pdwriter_t;
extern pdwriter_t pdwriter_open(const char*, const char*, size_t, size_t);
extern void pdwriter_close(pdwriter_t);
extern void pdwriter_new_value(pdwriter_t, const char*, pdunit_t, double);
extern void pdwriter_record_variable_str(pdwriter_t, char*, const char*);
EOF
'';
};
in
mkAppleDerivation {
releaseName = "IOKitTools";
outputs = [
"out"
"man"
];
xcodeHash = "sha256-qFG4sB8NXNPTSvYTEX2E1ReOX+NcMBHrS2NuNBLO7zw=";
nativeBuildInputs = [ pkg-config ];
buildInputs = [
apple-sdk.privateFrameworksHook
ncurses
];
env.NIX_CFLAGS_COMPILE = "-I${privateHeaders}/include";
meta.description = "IOKit tools";
}