Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Obtain Rust toolchain via fenix and update to 1.84 #148

Merged
merged 1 commit into from
Jan 27, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 45 additions & 6 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 16 additions & 9 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -1,23 +1,36 @@
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05";

flake-utils.url = "github:numtide/flake-utils";

fenix = {
url = "github:nix-community/fenix";
inputs.nixpkgs.follows = "nixpkgs";
};
};

outputs = {
self,
nixpkgs,
flake-utils,
fenix,
}:
flake-utils.lib.eachDefaultSystem (
system: let
pkgs = (import nixpkgs) {
inherit system;
};

toolchain = fenix.packages.${system}.toolchainOf {
channel = "1.84";
date = "2025-01-09";
sha256 = "lMLAupxng4Fd9F1oDw8gx+qA0RuF7ou7xhNU8wgs0PU=";
};

rustPlatform = pkgs.makeRustPlatform {
cargo = pkgs.cargo;
rustc = pkgs.rustc;
cargo = toolchain.cargo;
rustc = toolchain.rustc;
};

cargoToml = builtins.fromTOML (builtins.readFile ./Cargo.toml);
Expand All @@ -36,18 +49,12 @@

packages = with pkgs; [
# Rust toolchain
cargo
rustc

# Code analysis tools
clippy
rust-analyzer
toolchain.toolchain

# Code formatting tools
treefmt
alejandra
mdl
rustfmt

# Rust dependency linting
cargo-deny
Expand Down
Loading