Compare commits

...

2 Commits

Author SHA1 Message Date
Julia Ryan
8d5f038d9c warn users to install metal 2025-09-30 11:13:54 -07:00
Julia Ryan
c9b3f81b4e todo: override xcrun and linker 2025-09-30 10:39:12 -07:00
2 changed files with 17 additions and 2 deletions

View File

@@ -3,7 +3,6 @@
stdenv,
apple-sdk_15,
darwin,
darwinMinVersionHook,
cargo-about,
@@ -144,7 +143,6 @@ let
xorg.libxcb
]
++ lib.optionals stdenv'.hostPlatform.isDarwin [
apple-sdk_15
(darwinMinVersionHook "10.15")
];

View File

@@ -1,6 +1,7 @@
{
mkShell,
makeFontsConf,
lib,
zed-editor,
@@ -11,6 +12,7 @@
nixfmt-rfc-style,
protobuf,
nodejs_22,
cowsay,
}:
(mkShell.override { inherit (zed-editor) stdenv; }) {
inputsFrom = [ zed-editor ];
@@ -52,4 +54,19 @@
};
PROTOC = "${protobuf}/bin/protoc";
};
shellHook = lib.optionalString zed-editor.stdenv.hostPlatform.isDarwin ''
set -x
metal_compiler="$(env -u SDKROOT /usr/bin/xcrun -f metal)"
if ! $("$metal_compiler" --help &> /dev/null); then
{
echo 'Leave the devshell and run `xcodebuild -downloadComponent MetalToolchain`'
echo "to download the (proprietary 😤) metal compiler, or you'll need to pass"
echo '`--features gpui/runtime_shaders` to cargo.'
} |
${lib.getExe cowsay} -W 80
else
XCRUN_PATH=/usr/bin/xcrun
fi;
'';
}