-
Notifications
You must be signed in to change notification settings - Fork 246
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix nix build #1047
Fix nix build #1047
Conversation
HKalbasi
commented
Nov 29, 2023
•
edited by kkysen
Loading
edited by kkysen
- fix Cannot build on nix #1045
I think the CI failure is unrelated, but if it is not then please help me to fix it. |
Yes, one failure is a likely a permissions problem (c2rust-testsuite) which you can ignore. The other was a macOS provisioning problem which is hopefully (🤞) fixed now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made a couple minor suggestions, but overall I think this looks fine, though I don't really know much about nix so I can't really review that part of it. I think if this works for you on nix then it's fine, though.
c2rust-ast-exporter/build.rs
Outdated
.define("Clang_DIR", &format!("{}/cmake/clang", llvm_lib_dir)) | ||
.define( | ||
"LLVM_DIR", | ||
&env::var("CMAKE_LLVM_DIR").unwrap_or(format!("{}/cmake/llvm", llvm_lib_dir)), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
&env::var("CMAKE_LLVM_DIR").unwrap_or(format!("{}/cmake/llvm", llvm_lib_dir)), | |
&env::var("CMAKE_LLVM_DIR").unwrap_or_else(|| format!("{}/cmake/llvm", llvm_lib_dir)), |
c2rust-ast-exporter/build.rs
Outdated
) | ||
.define( | ||
"Clang_DIR", | ||
&env::var("CMAKE_CLANG_DIR").unwrap_or(format!("{}/cmake/clang", llvm_lib_dir)), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
&env::var("CMAKE_CLANG_DIR").unwrap_or(format!("{}/cmake/clang", llvm_lib_dir)), | |
&env::var("CMAKE_CLANG_DIR").unwrap_or_else(|| format!("{}/cmake/clang", llvm_lib_dir)), |
I can add nix build to CI to check that it works and prevent regressions in future, if desired. |
As Khyber said on another PR, we do not maintain the nix files for Rust but accept patches when something breaks. Kind of you to offer though; thanks! |
Anything else to do on this? |