diff options
| author | Mirza Arnaut <mirza.arnaut45@gmail.com> | 2026-07-05 21:31:46 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-07-05 22:31:46 +0300 |
| commit | 96fc43c960cfb4d9c524e005058fb113deba6b8a (patch) | |
| tree | bf648b7fae1db3d4a2f2e68dd894041f12558e43 | |
| parent | b1d1a07b1cd3963958ef48028c1c283cb5517d47 (diff) | |
refactor(nix): replace apple-sdk wrappers with xcbuild (#995)
Co-authored-by: Can Celik <ogulcancelik@gmail.com>
| -rw-r--r-- | nix/package.nix | 28 |
1 files changed, 2 insertions, 26 deletions
diff --git a/nix/package.nix b/nix/package.nix index 40c8c611..939fff9b 100644 --- a/nix/package.nix +++ b/nix/package.nix @@ -4,13 +4,12 @@ rustPlatform, callPackage, runCommand, - writeShellScriptBin, zig_0_15, zstd, pkg-config, git, - apple-sdk ? null, cctools ? null, + xcbuild ? null, }: let @@ -27,25 +26,6 @@ let '') entries} ''; }; - - darwinSdkRoot = "${apple-sdk}/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk"; - darwinDeveloperDir = "${apple-sdk}/Platforms/MacOSX.platform/Developer"; - darwinXcodeSelect = writeShellScriptBin "xcode-select" '' - if [ "$1" = "--print-path" ]; then - echo ${lib.escapeShellArg darwinDeveloperDir} - exit 0 - fi - echo "unsupported xcode-select invocation: $*" >&2 - exit 1 - ''; - darwinXcrun = writeShellScriptBin "xcrun" '' - if [ "$1" = "--sdk" ] && [ "$3" = "--show-sdk-path" ]; then - echo ${lib.escapeShellArg darwinSdkRoot} - exit 0 - fi - echo "unsupported xcrun invocation: $*" >&2 - exit 1 - ''; in rustPlatform.buildRustPackage { pname = "herdr"; @@ -78,8 +58,7 @@ rustPlatform.buildRustPackage { ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ cctools - darwinXcodeSelect - darwinXcrun + xcbuild ]; env = { @@ -87,9 +66,6 @@ rustPlatform.buildRustPackage { LIBGHOSTTY_VT_SIMD = "true"; LIBGHOSTTY_VT_ZIG_SYSTEM_DIR = zigDeps; ZIG = lib.getExe zig_0_15; - } - // lib.optionalAttrs stdenv.hostPlatform.isDarwin { - SDKROOT = darwinSdkRoot; }; preBuild = '' |
