From af4cde1e52f79ded78672edef85e99239a26a7f4 Mon Sep 17 00:00:00 2001 From: Daan Vanoverloop Date: Tue, 4 Jul 2023 20:31:05 +0200 Subject: [PATCH] Update --- flake.nix | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index af80991..99c3a64 100644 --- a/flake.nix +++ b/flake.nix @@ -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