fix macos CI

Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
This commit is contained in:
2023-01-21 16:01:35 +05:30
parent a0c99c2a70
commit ccf7b0566b
2 changed files with 23 additions and 11 deletions

View File

@@ -1,2 +1,11 @@
[build] [target.x86_64-unknown-linux-gnu]
rustflags = ["-C", "link-arg=-fuse-ld=lld"] rustflags = ["-C", "link-arg=-fuse-ld=lld"]
[target.i686-unknown-linux-gnu]
rustflags = ["-C", "link-arg=-fuse-ld=lld"]
[target.aarch64-unknown-linux-gnu]
rustflags = ["-C", "link-arg=-fuse-ld=lld"]
[target.aarch64-apple-darwin]
rustflags = ["-C", "link-arg=-fuse-ld=zld"]

View File

@@ -26,15 +26,18 @@
in rec { in rec {
devShell = with pkgs; devShell = with pkgs;
mkShell { mkShell {
nativeBuildInputs = [ nativeBuildInputs =
[
cmake cmake
openssl openssl
fontconfig fontconfig
pkg-config pkg-config
llvmPackages.lld
rust-analyzer rust-analyzer
toolchain toolchain
]; ]
++ lib.optionals (with stdenv.hostPlatform; (isx86 || isi686 || isAarch64) && isLinux) [llvmPackages.lld]
++ lib.optionals (with stdenv.hostPlatform; isDarwin && isAarch64) [zld]
++ lib.optionals stdenv.hostPlatforms.isDarwin [rustPlatform.bindgenHook];
}; };
formatter = pkgs.alejandra; formatter = pkgs.alejandra;