Skip to content

Commit 48b6460

Browse files
committed
flake: use MSRV for development
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
1 parent 42a61dc commit 48b6460

File tree

2 files changed

+63
-2
lines changed

2 files changed

+63
-2
lines changed

flake.lock

Lines changed: 40 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,38 @@
77
url = "github:numtide/flake-utils";
88
inputs.nixpkgs.follows = "nixpkgs";
99
};
10+
11+
rust = {
12+
url = "github:nix-community/fenix";
13+
inputs.nixpkgs.follows = "nixpkgs";
14+
};
1015
};
1116

12-
outputs = { self, nixpkgs, flake-utils }:
17+
outputs = { self, nixpkgs, flake-utils, rust }:
1318
flake-utils.lib.eachDefaultSystem (system:
1419
let
1520
pkgs = nixpkgs.legacyPackages.${system};
21+
22+
rust-toolchain = with rust.packages.${system};
23+
let
24+
channel_1_59_0 = {
25+
channel = "1.59.0";
26+
sha256 = "sha256-4IUZZWXHBBxcwRuQm9ekOwzc0oNqH/9NkI1ejW7KajU=";
27+
};
28+
29+
stable_1_59_0 = toolchainOf channel_1_59_0;
30+
in
31+
combine [
32+
(stable_1_59_0.withComponents [ "rustc" "cargo" "rust-src" "clippy" ])
33+
34+
latest.rustfmt
35+
latest.rust-analyzer
36+
];
1637
in
1738
{
1839
devShell = pkgs.mkShell {
1940
buildInputs = with pkgs; [
41+
rust-toolchain
2042
rust-bindgen
2143
pkg-config
2244
libarchive

0 commit comments

Comments
 (0)