Use rust-analyzer from fenix toolchain in flake (#6826)

This commit is contained in:
Max 2025-09-01 12:17:30 +00:00 committed by GitHub
parent 3d64f7b659
commit 64f0c12d0a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 7 additions and 4 deletions

View File

@ -46,11 +46,11 @@
pname = "typst";
version = cargoToml.workspace.package.version;
rust-toolchain = (fenix.packages.${system}.fromManifestFile rust-manifest).defaultToolchain;
rust-toolchain = fenix.packages.${system}.fromManifestFile rust-manifest;
# Crane-based Nix flake configuration.
# Based on https://github.com/ipetkov/crane/blob/master/examples/trunk-workspace/flake.nix
craneLib = (crane.mkLib pkgs).overrideToolchain rust-toolchain;
craneLib = (crane.mkLib pkgs).overrideToolchain rust-toolchain.defaultToolchain;
# Typst files to include in the derivation.
# Here we include Rust files, docs and tests.
@ -150,10 +150,13 @@
checks = self'.checks;
inputsFrom = [ typst ];
buildInputs = with pkgs; [
rust-analyzer
buildInputs = [
rust-toolchain.rust-analyzer
rust-toolchain.rust-src
];
RUST_SRC_PATH = "${rust-toolchain.rust-src}/lib/rustlib/src/rust/library";
packages = [
# A script for quickly running tests.
# See https://github.com/typst/typst/blob/main/tests/README.md#making-an-alias