suggest: large suggestion to flake.nix#2136
Conversation
Mostly style changes and missing tools - format with alejandra for better readability - add missing cargo-nextest, rust-src component (for lsp), alejandra - use specialized pkg.mkShell instead of mkDerivation - remove hardeningDisable, not sure it's needed
|
| packages = [ | ||
| rust-toolchain | ||
| pkgs.rust-cbindgen | ||
| pkgs.cargo-nextest | ||
| pkgs.cmake | ||
| pkgs.autoconf | ||
| pkgs.automake | ||
| pkgs.libtool | ||
| pkgs.alejandra | ||
| ]; |
There was a problem hiding this comment.
Nit
| packages = [ | |
| rust-toolchain | |
| pkgs.rust-cbindgen | |
| pkgs.cargo-nextest | |
| pkgs.cmake | |
| pkgs.autoconf | |
| pkgs.automake | |
| pkgs.libtool | |
| pkgs.alejandra | |
| ]; | |
| packages = with pkgs; [ | |
| rust-toolchain | |
| rust-cbindgen | |
| cargo-nextest | |
| cmake | |
| autoconf | |
| automake | |
| libtool | |
| alejandra | |
| ]; |
There was a problem hiding this comment.
I just changed it a bit to separate rust-toolchain in a separate list in case it ever becomes a package in nixpkgs so that it doesn't get overriden.
| overlays = [(import rust-overlay)]; | ||
| }; | ||
| mkShell = rust-toolchain: | ||
| pkgs.mkShell { |
There was a problem hiding this comment.
I totally missed we didn't use mkShell in the previous PR, but just mkDerivation. This is the way to go indeed 👍
| [toolchain] | ||
| channel = "1.87.0" | ||
| components = ["rustfmt", "clippy"] | ||
| components = ["clippy", "rust-src"] |
There was a problem hiding this comment.
Why this change? Doesn't this impact non Nix-users in some way?
There was a problem hiding this comment.
Because we never use the stable rustfmt anyway, also we need rust-src for rust-analyzer to allow go-to-definition to std functions.
I feel like the only impact it could've had is CI failing because it could not find rustfmt but as said above we don't use the stable rustfmt
Artifact Size Benchmark Reportaarch64-alpine-linux-musl
aarch64-unknown-linux-gnu
libdatadog-x64-windows
libdatadog-x86-windows
x86_64-alpine-linux-musl
x86_64-unknown-linux-gnu
|
A large suggestions for #2128