apple-source-releases: make it compile on aarch64
This commit is contained in:
parent
2eb97f2ddd
commit
da3ae0231a
@ -1,5 +1,5 @@
|
|||||||
{ stdenv, appleDerivation, lib
|
{ stdenv, appleDerivation, lib
|
||||||
, Librpcsvc, apple_sdk, pam, CF, openbsm }:
|
, libutil, Librpcsvc, apple_sdk, pam, CF, openbsm }:
|
||||||
|
|
||||||
appleDerivation {
|
appleDerivation {
|
||||||
# xcbuild fails with:
|
# xcbuild fails with:
|
||||||
@ -7,7 +7,7 @@ appleDerivation {
|
|||||||
# see issue facebook/xcbuild#188
|
# see issue facebook/xcbuild#188
|
||||||
# buildInputs = [ xcbuild ];
|
# buildInputs = [ xcbuild ];
|
||||||
|
|
||||||
buildInputs = [ Librpcsvc apple_sdk.frameworks.OpenDirectory pam CF
|
buildInputs = [ libutil Librpcsvc apple_sdk.frameworks.OpenDirectory pam CF
|
||||||
apple_sdk.frameworks.IOKit openbsm ];
|
apple_sdk.frameworks.IOKit openbsm ];
|
||||||
# NIX_CFLAGS_COMPILE = lib.optionalString hostPlatform.isi686 "-D__i386__"
|
# NIX_CFLAGS_COMPILE = lib.optionalString hostPlatform.isi686 "-D__i386__"
|
||||||
# + lib.optionalString hostPlatform.isx86_64 "-D__x86_64__"
|
# + lib.optionalString hostPlatform.isx86_64 "-D__x86_64__"
|
||||||
@ -35,6 +35,11 @@ appleDerivation {
|
|||||||
--replace bsm/audit_session.h bsm/audit.h
|
--replace bsm/audit_session.h bsm/audit.h
|
||||||
substituteInPlace login.tproj/login_audit.c \
|
substituteInPlace login.tproj/login_audit.c \
|
||||||
--replace bsm/audit_session.h bsm/audit.h
|
--replace bsm/audit_session.h bsm/audit.h
|
||||||
|
'' + lib.optionalString stdenv.isAarch64 ''
|
||||||
|
substituteInPlace sysctl.tproj/sysctl.c \
|
||||||
|
--replace "GPROF_STATE" "0"
|
||||||
|
substituteInPlace login.tproj/login.c \
|
||||||
|
--replace "defined(__arm__)" "defined(__arm__) || defined(__arm64__)"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
buildPhase = ''
|
buildPhase = ''
|
||||||
|
Loading…
x
Reference in New Issue
Block a user