This commit is contained in:
Daan Vanoverloop 2023-07-04 20:31:05 +02:00
parent 299c0f0465
commit af4cde1e52
Signed by: Danacus
GPG Key ID: F2272B50E129FC5C
1 changed files with 28 additions and 1 deletions

View File

@ -13,7 +13,9 @@
# Provides a `rustToolchain` attribute for Nixpkgs that we can use to
# create a Rust environment
(self: super: {
rustToolchain = super.rust-bin.stable.latest.default;
rustToolchain = super.rust-bin.stable.latest.default.override {
extensions = [ "rust-src" "rustfmt" "rust-analyzer" ];
};
})
];
@ -40,6 +42,31 @@
]);
};
rust-llvm = pkgs.mkShell {
# The Nix packages provided in the environment
packages = (with pkgs; [
# The package provided by our custom overlay. Includes cargo, Clippy, cargo-fmt,
# rustdoc, rustfmt, and other tools.
rustToolchain
python311
cmake
ninja
libffi
]) ++ (with pkgs.llvmPackages_16; [
libllvm
clang
libclang
# This is the real lld package
bintools
]);
# Need this to fix rust-bindgen
LIBCLANG_PATH="${pkgs.llvmPackages_16.libclang.lib}/lib";
BINDGEN_EXTRA_CLANG_ARGS = "-isystem ${pkgs.llvmPackages_16.libclang.lib}/lib/clang/${nixpkgs.lib.getVersion pkgs.llvmPackages_16.clang}/include";
};
latex = pkgs.mkShell {
packages = (with pkgs; [
texlive.combined.scheme-full