From c9d5324e6946ef5a52736b06610ac214fef421b3 Mon Sep 17 00:00:00 2001 From: Amneesh Singh Date: Sat, 21 Jan 2023 16:01:35 +0530 Subject: [PATCH] fix macos CI Signed-off-by: Amneesh Singh --- .cargo/config.toml | 10 ++++++++-- flake.nix | 19 ++++++++++--------- 2 files changed, 18 insertions(+), 11 deletions(-) diff --git a/.cargo/config.toml b/.cargo/config.toml index 678266e..db65bc6 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -1,2 +1,8 @@ -[build] -rustflags = ["-C", "link-arg=-fuse-ld=lld"] \ No newline at end of file +[target.x86_64-unknown-linux-gnu] +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"] diff --git a/flake.nix b/flake.nix index c609842..18dd54f 100644 --- a/flake.nix +++ b/flake.nix @@ -26,15 +26,16 @@ in rec { devShell = with pkgs; mkShell { - nativeBuildInputs = [ - cmake - openssl - fontconfig - pkg-config - llvmPackages.lld - rust-analyzer - toolchain - ]; + nativeBuildInputs = + [ + cmake + openssl + fontconfig + pkg-config + rust-analyzer + toolchain + ] + ++ lib.optionals (with stdenv.hostPlatform; (isx86 || isi686 || isAarch64) && isLinux) [llvmPackages.lld]; }; formatter = pkgs.alejandra;