Skip to content

Commit 0cf503a

Browse files
committed
More cleanup
1 parent 881d474 commit 0cf503a

1 file changed

Lines changed: 4 additions & 9 deletions

File tree

devenv.nix

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,7 @@
1010
# https://devenv.sh/packages/
1111
packages =
1212
(with pkgs; [
13-
#
1413
# Common development tools
15-
#
1614
cmake
1715
ninja
1816
pkg-config
@@ -26,27 +24,22 @@
2624
spirv-headers
2725
glslang
2826

29-
# Platform-specific shader compilers
27+
# Shader compilers
3028
shaderc
29+
directx-shader-compiler
3130

3231
# Math library for examples
3332
glm
3433
])
3534
# macOS specific packages
3635
++ lib.optionals pkgs.stdenv.isDarwin [
37-
pkgs.directx-shader-compiler
3836
pkgs.moltenvk
3937
pkgs.vulkan-validation-layers
4038
]
41-
++ lib.optionals (!pkgs.stdenv.isDarwin) [
42-
pkgs.directx-shader-compiler
43-
]
4439
# SDL2 from pinned nixpkgs
4540
++ [ inputs.nixpkgs-sdl2.legacyPackages.${pkgs.system}.SDL2 ]
4641
++ lib.optionals pkgs.stdenv.isLinux (with pkgs; [
47-
#
4842
# Linux specific packages
49-
#
5043
clang
5144
clang-tools
5245
lldb
@@ -131,8 +124,10 @@
131124
enterShell = lib.optionalString pkgs.stdenv.isDarwin ''
132125
export DEVELOPER_DIR="$(/usr/bin/readlink /var/db/xcode_select_link)"
133126
export SDKROOT="$DEVELOPER_DIR/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk"
127+
134128
# Use system clang instead of Nix's clang-wrapper
135129
export PATH="$DEVELOPER_DIR/Toolchains/XcodeDefault.xctoolchain/usr/bin:$DEVELOPER_DIR/usr/bin:$PATH"
130+
136131
# Use system xcrun instead of Nix's xcbuild version (avoids Metal compiler warnings)
137132
export PATH="${pkgs.runCommand "xcrun-wrapper" {} "mkdir -p $out/bin && ln -s /usr/bin/xcrun $out/bin/xcrun"}/bin:$PATH"
138133
'';

0 commit comments

Comments
 (0)