forked from M-Labs/nac3
1
0
Fork 0

flake: Add clang alongside clang-unwrapped

This commit is contained in:
David Mak 2023-09-25 15:38:33 +08:00 committed by sb10q
parent 119f4d63e9
commit 9b28f23d8c
2 changed files with 5 additions and 3 deletions

View File

@ -9,6 +9,7 @@
in rec { in rec {
packages.x86_64-linux = rec { packages.x86_64-linux = rec {
llvm-nac3 = pkgs.callPackage ./nix/llvm {}; 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 ( nac3artiq = pkgs.python3Packages.toPythonModule (
pkgs.rustPlatform.buildRustPackage rec { pkgs.rustPlatform.buildRustPackage rec {
name = "nac3artiq"; name = "nac3artiq";
@ -18,7 +19,7 @@
lockFile = ./Cargo.lock; lockFile = ./Cargo.lock;
}; };
passthru.cargoLock = cargoLock; 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 ]; buildInputs = [ pkgs.python3 llvm-nac3 ];
checkInputs = [ (pkgs.python3.withPackages(ps: [ ps.numpy ])) ]; checkInputs = [ (pkgs.python3.withPackages(ps: [ ps.numpy ])) ];
checkPhase = checkPhase =
@ -143,7 +144,8 @@
buildInputs = with pkgs; [ buildInputs = with pkgs; [
# build dependencies # build dependencies
packages.x86_64-linux.llvm-nac3 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 pkgs.llvmPackages_14.llvm.out # IRRT
cargo cargo
rustc rustc

View File

@ -29,7 +29,7 @@ fn main() {
"-o", "-o",
"-", "-",
]; ];
let output = Command::new("clang") let output = Command::new("clang-unwrapped")
.args(FLAG) .args(FLAG)
.output() .output()
.map(|o| { .map(|o| {