mirror of
https://github.com/ipetkov/crane.git
synced 2024-11-25 21:42:20 +03:00
devShell: add clippy and rustfmt from the current toolchain (#432)
This commit is contained in:
parent
159f71f4f0
commit
f2b70c85d5
@ -10,6 +10,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
||||
* `craneUtils` will now be built with the `rustPlatform` provided by nixpkgs
|
||||
instead of the currently configured toolchain. This should hopefully result in
|
||||
fewer surprises for those testing with really old MSRV toolchains.
|
||||
* `devShell` will now additionally include `clippy` and `rustfmt` from the
|
||||
currently configured toolchain
|
||||
|
||||
## [0.14.2] - 2023-10-15
|
||||
|
||||
|
@ -780,6 +780,9 @@ attributes are passed straight through, so any `mkShell` behavior can be used
|
||||
as expected: namely, all key-value pairs other than those `mkShell` consumes
|
||||
will be set as environment variables in the resulting shell.
|
||||
|
||||
Note that the current toolchain's `cargo`, `clippy`, `rustc`, and `rustfmt`
|
||||
packages will automatically be added to the devShell.
|
||||
|
||||
#### Optional attributes
|
||||
* `checks`: A set of checks to inherit inputs from, typically
|
||||
`self.checks.${system}`. Build inputs from the values in this attribute set
|
||||
|
@ -1,6 +1,8 @@
|
||||
{ cargo
|
||||
, clippy
|
||||
, mkShell
|
||||
, rustc
|
||||
, rustfmt
|
||||
}:
|
||||
|
||||
{ checks ? { }
|
||||
@ -20,10 +22,10 @@ in
|
||||
mkShell (cleanedArgs // {
|
||||
inputsFrom = builtins.attrValues checks ++ inputsFrom;
|
||||
|
||||
packages =
|
||||
[
|
||||
rustc
|
||||
cargo
|
||||
]
|
||||
++ packages;
|
||||
packages = [
|
||||
rustc
|
||||
cargo
|
||||
clippy
|
||||
rustfmt
|
||||
] ++ packages;
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user