Skip to content

Commit

Permalink
Obtain Rust toolchain via fenix and update to 1.84
Browse files Browse the repository at this point in the history
  • Loading branch information
DanNixon committed Jan 27, 2025
1 parent bb5bb56 commit 719d9ca
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 15 deletions.
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

0 comments on commit 719d9ca

Please sign in to comment.