Today, while waiting for LLVM to build, I've spend some time figuring out what should I do, on NixOS, to avoid building LLVM I want to document this here, so that I can refer to this post if I accidentally delete my config
So, I have the following shell.nix
in the repository's root folder:
with import <nixpkgs> {};
pkgs.mkShell {
buildInputs = [
pkgconfig openssl cmake zlib libgit2 python llvm_7 libxml2
];
shellHook = ''
export TMPDIR=/tmp
export RUSTC_BOOTSTRAP=1
'';
}
and the following in config.toml
:
[target.x86_64-unknown-linux-gnu]
llvm-config = "/nix/store/5fh968hna30c87bldn30wgi1j7vhrd5y-llvm-7.0.1/bin/llvm-config"