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:
parent
bd031f9105
commit
c394a61aa0
2 changed files with 12 additions and 8 deletions
|
|
@ -1,13 +1,24 @@
|
||||||
{
|
{
|
||||||
|
pkgs,
|
||||||
craneLib,
|
craneLib,
|
||||||
}:
|
}:
|
||||||
|
|
||||||
toolchainName: toolchain:
|
toolchainName:
|
||||||
|
|
||||||
let
|
let
|
||||||
pname = "cargo-dylint-driver-${toolchainName}";
|
pname = "cargo-dylint-driver-${toolchainName}";
|
||||||
version = "4.0.0";
|
version = "4.0.0";
|
||||||
src = ../dylint_driver;
|
src = ../dylint_driver;
|
||||||
|
toolchain =
|
||||||
|
(pkgs.rust-bin.fromRustupToolchainFile (
|
||||||
|
pkgs.writeText "${toolchainName}-toolchain.toml" toolchainName
|
||||||
|
)).override
|
||||||
|
{
|
||||||
|
extensions = [
|
||||||
|
"rustc-dev"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
in
|
in
|
||||||
|
|
||||||
(craneLib.overrideToolchain toolchain).buildPackage ({
|
(craneLib.overrideToolchain toolchain).buildPackage ({
|
||||||
|
|
|
||||||
|
|
@ -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}'"
|
"Rust toolchains generally do not start with numbers. Make sure you include the channel, as in `nightly-YYYY-MM-DD`. Given '${name}'"
|
||||||
mkCargoDylintDriver
|
mkCargoDylintDriver
|
||||||
"${name}"
|
"${name}"
|
||||||
(
|
|
||||||
pkgs.rust-bin.nightly."${lib.removePrefix "nightly-" name}".default.override {
|
|
||||||
extensions = [
|
|
||||||
"rustc-dev"
|
|
||||||
];
|
|
||||||
}
|
|
||||||
)
|
|
||||||
) driver_names;
|
) driver_names;
|
||||||
drivers = pkgs.runCommandLocal "dylint-drivers" { } ''
|
drivers = pkgs.runCommandLocal "dylint-drivers" { } ''
|
||||||
mkdir -p $out
|
mkdir -p $out
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue