Skip to content

Commit c3edfaa

Browse files
committed
Merge branch 'master' into jit-rs
2 parents ff242b3 + 8365799 commit c3edfaa

File tree

2 files changed

+15
-13
lines changed

2 files changed

+15
-13
lines changed

flake.lock

+6-6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

+9-7
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,11 @@
1313
rev = with self; if sourceInfo?dirtyRev then sourceInfo.dirtyRev else sourceInfo.rev;
1414
pkgs = import nixpkgs { inherit system; };
1515

16+
llvmPackages = pkgs.llvmPackages_19;
17+
1618
devShellTools = [
17-
pkgs.clang-tools
19+
llvmPackages.clang-tools
20+
pkgs.git
1821
pkgs.rust-analyzer
1922
];
2023

@@ -39,16 +42,13 @@
3942
pkgs.capstone
4043
pkgs.dbus
4144
pkgs.bzip2
42-
] ++ pkgs.lib.optionals pkgs.stdenv.isDarwin [
43-
pkgs.darwin.apple_sdk.frameworks.Cocoa
4445
] ++ pkgs.lib.optionals (!pkgs.stdenv.isDarwin) [
4546
pkgs.qt6.qtbase # TODO: Qt should work on Darwin too
4647
pkgs.qt6.wrapQtAppsHook
4748
];
48-
stdenv =
49-
if pkgs.stdenv.isLinux then pkgs.stdenv
50-
else if pkgs.stdenv.isDarwin then pkgs.clang18Stdenv
51-
else throw "Unsupported platform";
49+
stdenv = if pkgs.stdenv.isLinux then pkgs.stdenv
50+
else if pkgs.stdenv.isDarwin then llvmPackages.stdenv
51+
else throw "Unsupported platform";
5252

5353
cargoDeps = pkgs.rustPlatform.importCargoLock {
5454
lockFile = ./src/jit/Cargo.lock;
@@ -123,6 +123,8 @@
123123
'' + (if stdenv.isLinux then ''
124124
export LD_LIBRARY_PATH="${pkgs.vulkan-loader}/lib";
125125
'' else if stdenv.isDarwin then ''
126+
# clangd needs to come from clang-tools. Because Darwin uses clang stdenv, this is the only way to ensure we use the right clangd.
127+
export PATH="${llvmPackages.clang-tools}/bin:$PATH";
126128
export DYLD_FALLBACK_LIBRARY_PATH="${pkgs.darwin.moltenvk}/lib";
127129
'' else throw "Unsupported platform");
128130
};

0 commit comments

Comments
 (0)