Skip to content

Commit 367cf88

Browse files
authored
use nightly in devshell (#165)
following on from technical discussion, move to using nightly in the devshell, but keep stable for builds + CI when running `nix flake update`, it will update to the latest nightly that has miri
2 parents c3ce81b + e452ea1 commit 367cf88

File tree

2 files changed

+15
-9
lines changed

2 files changed

+15
-9
lines changed

nix/automation/devshells.nix

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,13 @@
33
cell,
44
}: let
55
inherit (inputs) nixpkgs std;
6-
inherit (inputs.cells.lib.toolchains) rustToolchain;
6+
inherit (inputs.cells.lib.toolchains) rustNightly;
77
l = nixpkgs.lib // builtins;
88

99
mkEnv = env: l.mapAttrsToList (name: value: {inherit name value;}) env;
1010

11+
12+
1113
catalystCore = {...}: {
1214
name = nixpkgs.lib.mkForce "Catalyst Core";
1315
env = with nixpkgs;
@@ -25,7 +27,7 @@
2527
];
2628
packages = with nixpkgs; [
2729
gcc
28-
rustToolchain
30+
rustNightly
2931
pkg-config
3032
protobuf
3133
uniffi-bindgen

nix/lib/toolchains.nix

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,21 @@
1-
{
2-
inputs,
3-
cell,
4-
}: let
1+
{ inputs
2+
, cell
3+
,
4+
}:
5+
let
56
inherit (inputs) nixpkgs rust-overlay;
6-
in rec {
7+
in
8+
rec {
79
naersk = nixpkgs.callPackage inputs.naersk {
810
cargo = rustToolchain;
911
rustc = rustToolchain;
1012
};
1113
rust-bin =
1214
(nixpkgs.appendOverlays [
1315
(import rust-overlay)
14-
])
15-
.rust-bin;
16+
]).rust-bin;
1617
rustToolchain = rust-bin.fromRustupToolchainFile (inputs.self + "/rust-toolchain");
18+
rustNightly = rust-bin.selectLatestNightlyWith (toolchain: toolchain.default.override {
19+
extensions = [ "rustfmt" "rust-src" "miri" ];
20+
});
1721
}

0 commit comments

Comments
 (0)