From 9b28f23d8c5dfa3adfd9bcec596c7689a3f6d94c Mon Sep 17 00:00:00 2001 From: David Mak Date: Mon, 25 Sep 2023 15:38:33 +0800 Subject: [PATCH] flake: Add clang alongside clang-unwrapped --- flake.nix | 6 ++++-- nac3core/build.rs | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/flake.nix b/flake.nix index b6ad250e0..0932e9484 100644 --- a/flake.nix +++ b/flake.nix @@ -9,6 +9,7 @@ in rec { packages.x86_64-linux = rec { llvm-nac3 = pkgs.callPackage ./nix/llvm {}; + clang-unwrapped = pkgs.runCommandNoCC "clang-unwrapped" {} "mkdir -p $out/bin; ln -s ${pkgs.llvmPackages_14.clang-unwrapped}/bin/clang $out/bin/clang-unwrapped"; nac3artiq = pkgs.python3Packages.toPythonModule ( pkgs.rustPlatform.buildRustPackage rec { name = "nac3artiq"; @@ -18,7 +19,7 @@ lockFile = ./Cargo.lock; }; passthru.cargoLock = cargoLock; - nativeBuildInputs = [ pkgs.python3 pkgs.llvmPackages_14.clang-unwrapped pkgs.llvmPackages_14.llvm.out llvm-nac3 ]; + nativeBuildInputs = [ pkgs.python3 pkgs.llvmPackages_14.clang packages.x86_64-linux.clang-unwrapped pkgs.llvmPackages_14.llvm.out llvm-nac3 ]; buildInputs = [ pkgs.python3 llvm-nac3 ]; checkInputs = [ (pkgs.python3.withPackages(ps: [ ps.numpy ])) ]; checkPhase = @@ -143,7 +144,8 @@ buildInputs = with pkgs; [ # build dependencies packages.x86_64-linux.llvm-nac3 - llvmPackages_14.clang-unwrapped # IRRT + llvmPackages_14.clang # demo + packages.x86_64-linux.clang-unwrapped # IRRT pkgs.llvmPackages_14.llvm.out # IRRT cargo rustc diff --git a/nac3core/build.rs b/nac3core/build.rs index a032bb934..304d60263 100644 --- a/nac3core/build.rs +++ b/nac3core/build.rs @@ -29,7 +29,7 @@ fn main() { "-o", "-", ]; - let output = Command::new("clang") + let output = Command::new("clang-unwrapped") .args(FLAG) .output() .map(|o| {