Directly use the toolchain as given

Previously we hardcoded the nightly chain. This might not be true in the
future!

Signed-off-by: Marcel Müller <neikos@neikos.email>
This commit is contained in:
Marcel Müller 2025-03-04 11:08:21 +01:00
parent bd031f9105
commit c394a61aa0
2 changed files with 12 additions and 8 deletions

View file

@ -1,13 +1,24 @@
{
pkgs,
craneLib,
}:
toolchainName: toolchain:
toolchainName:
let
pname = "cargo-dylint-driver-${toolchainName}";
version = "4.0.0";
src = ../dylint_driver;
toolchain =
(pkgs.rust-bin.fromRustupToolchainFile (
pkgs.writeText "${toolchainName}-toolchain.toml" toolchainName
)).override
{
extensions = [
"rustc-dev"
];
};
in
(craneLib.overrideToolchain toolchain).buildPackage ({

View file

@ -17,13 +17,6 @@ let
"Rust toolchains generally do not start with numbers. Make sure you include the channel, as in `nightly-YYYY-MM-DD`. Given '${name}'"
mkCargoDylintDriver
"${name}"
(
pkgs.rust-bin.nightly."${lib.removePrefix "nightly-" name}".default.override {
extensions = [
"rustc-dev"
];
}
)
) driver_names;
drivers = pkgs.runCommandLocal "dylint-drivers" { } ''
mkdir -p $out