Skip to content

Commit 902adef

Browse files
committed
all: add rust-src to rust-toolchain.toml
1 parent dc6981c commit 902adef

File tree

3 files changed

+22
-34
lines changed

3 files changed

+22
-34
lines changed

flake.lock

Lines changed: 9 additions & 23 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
{
22
inputs = {
33
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
4-
rust.url = "github:oxalica/rust-overlay";
4+
rust = {
5+
url = "github:oxalica/rust-overlay";
6+
inputs.nixpkgs.follows = "nixpkgs";
7+
};
58
foundry.url = "github:shazow/foundry.nix/stable";
69
process-compose-flake.url = "github:Platonic-Systems/process-compose-flake";
710
services-flake.url = "github:juspay/services-flake";
@@ -21,19 +24,18 @@
2124
perSystem = { config, self', inputs', pkgs, system, ... }:
2225
let
2326
overlays = [
24-
(import rust)
25-
(self: super: {
26-
rust-toolchain = super.rust-bin.stable.latest.default;
27-
})
27+
rust.overlays.default
2828
foundry.overlay
2929
];
3030

31-
pkgsWithOverlays = import nixpkgs {
31+
pkgs = import nixpkgs {
3232
inherit overlays system;
3333
};
34+
35+
rust-toolchain = pkgs.rust-bin.fromRustupToolchainFile ./rust-toolchain.toml;
3436
in {
35-
devShells.default = pkgsWithOverlays.mkShell {
36-
packages = (with pkgsWithOverlays; [
37+
devShells.default = pkgs.mkShell {
38+
packages = (with pkgs; [
3739
rust-toolchain
3840
foundry-bin
3941
solc
@@ -63,7 +65,7 @@
6365
initialDatabases = [
6466
{
6567
inherit name;
66-
schemas = [ (pkgsWithOverlays.writeText "init-${name}.sql" ''
68+
schemas = [ (pkgs.writeText "init-${name}.sql" ''
6769
CREATE EXTENSION IF NOT EXISTS pg_trgm;
6870
CREATE EXTENSION IF NOT EXISTS btree_gist;
6971
CREATE EXTENSION IF NOT EXISTS postgres_fdw;
@@ -146,7 +148,7 @@
146148

147149
services.anvil."anvil-integration" = {
148150
enable = true;
149-
package = pkgsWithOverlays.foundry-bin;
151+
package = pkgs.foundry-bin;
150152
port = 3021;
151153
timestamp = 1743944919;
152154
};

rust-toolchain.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
[toolchain]
22
channel = "stable"
33
profile = "default"
4-
components = [ "rustfmt" ]
4+
components = [ "rustfmt", "rust-src" ]

0 commit comments

Comments
 (0)