xcbuild: move top level override into package.nix

This commit is contained in:
Aliaksandr
2026-01-31 20:06:04 -05:00
committed by Michael Daniels
parent c4834cc73a
commit 94875861d0
2 changed files with 5 additions and 9 deletions
+5 -3
View File
@@ -8,6 +8,8 @@
makeBinaryWrapper,
ninja,
stdenv,
# xcbuild is included in the SDK. Avoid an infinite recursion by using a bootstrap stdenv
stdenv' ? if stdenv.hostPlatform.isDarwin then darwin.bootstrapStdenv else stdenv,
zlib,
# These are deprecated and do nothing. Theyre needed for compatibility and will
@@ -56,7 +58,7 @@ let
sha256 = "sha256-nKxwWuSqr89lvI9Y3QAW5Mo7/iFfMNj/OOQVeA/FWnE=";
};
in
stdenv.mkDerivation (finalAttrs: {
stdenv'.mkDerivation (finalAttrs: {
pname = "xcbuild";
outputs = [
@@ -101,7 +103,7 @@ stdenv.mkDerivation (finalAttrs: {
substituteInPlace Libraries/pbxbuild/Sources/Tool/ScriptResolver.cpp \
--replace-fail "/bin/sh" "sh"
''
+ lib.optionalString (!stdenv.hostPlatform.isDarwin) ''
+ lib.optionalString (!stdenv'.hostPlatform.isDarwin) ''
# Fix build on gcc-13 due to missing includes
sed -e '1i #include <cstdint>' -i \
Libraries/libutil/Headers/libutil/Permissions.h \
@@ -112,7 +114,7 @@ stdenv.mkDerivation (finalAttrs: {
sed 1i'#include <sys/sysmacros.h>' \
-i Libraries/xcassets/Headers/xcassets/Slot/SystemVersion.h
''
+ lib.optionalString stdenv.hostPlatform.isDarwin ''
+ lib.optionalString stdenv'.hostPlatform.isDarwin ''
# Apple Open Sourced LZFSE, but not libcompression, and it isn't
# part of an impure framework we can add
substituteInPlace Libraries/libcar/Sources/Rendition.cpp \
-6
View File
@@ -6383,12 +6383,6 @@ with pkgs;
watson-ruby = callPackage ../development/tools/misc/watson-ruby { };
xcbuild = callPackage ../by-name/xc/xcbuild/package.nix {
stdenv =
# xcbuild is included in the SDK. Avoid an infinite recursion by using a bootstrap stdenv.
if stdenv.hostPlatform.isDarwin then darwin.bootstrapStdenv else stdenv;
};
xcbuildHook = makeSetupHook {
name = "xcbuild-hook";
propagatedBuildInputs = [ xcbuild ];