fix(ci): include rust-src in flake.nix

This commit is contained in:
Michael Fortunato 2025-03-27 09:41:50 -05:00
parent 838a46dbb7
commit f41cca8b00
No known key found for this signature in database
GPG Key ID: 8B87187D74CC41FC

View File

@ -29,7 +29,11 @@
pname = "typst";
version = cargoToml.workspace.package.version;
rust-toolchain = (fenix.packages.${system}.fromManifestFile rust-manifest).defaultToolchain;
rust-toolchain = fenix.packages.${system}.combine [
(fenix.packages.${system}.fromManifestFile
rust-manifest).defaultToolchain
(fenix.packages.${system}.fromManifestFile rust-manifest).rust-src
];
# Crane-based Nix flake configuration.
# Based on https://github.com/ipetkov/crane/blob/master/examples/trunk-workspace/flake.nix
@ -127,6 +131,12 @@
checks = self'.checks;
inputsFrom = [ typst ];
# Set environment variables for rust-analyzer
shellHook = ''
export RUST_SRC_PATH="${rust-toolchain}/lib/rustlib/src/rust/library"
export RUST_BACKTRACE=1
'';
packages = [
# A script for quickly running tests.
# See https://github.com/typst/typst/blob/main/tests/README.md#making-an-alias