Skip to content

Commit ae9418f

Browse files
committed
More cleanup
1 parent 881d474 commit ae9418f

1 file changed

Lines changed: 7 additions & 11 deletions

File tree

devenv.nix

Lines changed: 7 additions & 11 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,24 @@
2624
spirv-headers
2725
glslang
2826

29-
# Platform-specific shader compilers
27+
# Shader compilers
3028
shaderc
29+
directx-shader-compiler
30+
31+
# Vulkan validation
32+
vulkan-validation-layers
3133

3234
# Math library for examples
3335
glm
3436
])
3537
# macOS specific packages
3638
++ lib.optionals pkgs.stdenv.isDarwin [
37-
pkgs.directx-shader-compiler
3839
pkgs.moltenvk
39-
pkgs.vulkan-validation-layers
40-
]
41-
++ lib.optionals (!pkgs.stdenv.isDarwin) [
42-
pkgs.directx-shader-compiler
4340
]
4441
# SDL2 from pinned nixpkgs
4542
++ [ inputs.nixpkgs-sdl2.legacyPackages.${pkgs.system}.SDL2 ]
4643
++ lib.optionals pkgs.stdenv.isLinux (with pkgs; [
47-
#
4844
# Linux specific packages
49-
#
5045
clang
5146
clang-tools
5247
lldb
@@ -58,7 +53,6 @@
5853
xorg.libX11
5954
xorg.libXrandr
6055
xorg.libXi
61-
vulkan-validation-layers
6256
])
6357
# Note: On macOS, we use the system SDK via Xcode, so we don't need
6458
# to include Darwin frameworks from nixpkgs here.
@@ -131,8 +125,10 @@
131125
enterShell = lib.optionalString pkgs.stdenv.isDarwin ''
132126
export DEVELOPER_DIR="$(/usr/bin/readlink /var/db/xcode_select_link)"
133127
export SDKROOT="$DEVELOPER_DIR/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk"
128+
134129
# Use system clang instead of Nix's clang-wrapper
135130
export PATH="$DEVELOPER_DIR/Toolchains/XcodeDefault.xctoolchain/usr/bin:$DEVELOPER_DIR/usr/bin:$PATH"
131+
136132
# Use system xcrun instead of Nix's xcbuild version (avoids Metal compiler warnings)
137133
export PATH="${pkgs.runCommand "xcrun-wrapper" {} "mkdir -p $out/bin && ln -s /usr/bin/xcrun $out/bin/xcrun"}/bin:$PATH"
138134
'';

0 commit comments

Comments
 (0)