Skip to content

Commit

Permalink
chore: update dev shell flake (foundry-rs#8314)
Browse files Browse the repository at this point in the history
Updated to latest Rust toolchain version (v1.79). The rust overlay
doesn't use `flake-utils` anymore. Switched to solc 0.8.23 since that's
the default for the tests. Moved around the deps to be more in line with
recommendations (`buildInputs` for things that get linked and
`nativeBuildInputs` for what's needed during compilation only,
`packages` for things that are not needed at compile time).
  • Loading branch information
beeb authored Jun 30, 2024
1 parent 82c0404 commit 21c40c7
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 23 deletions.
36 changes: 23 additions & 13 deletions flake.lock

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

16 changes: 6 additions & 10 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
url = "github:oxalica/rust-overlay";
inputs = {
nixpkgs.follows = "nixpkgs";
flake-utils.follows = "flake-utils";
};
};
solc = {
Expand All @@ -21,7 +20,6 @@
outputs = { self, nixpkgs, rust-overlay, flake-utils, solc }:
flake-utils.lib.eachDefaultSystem (system:
let
overlays = [ (import rust-overlay) ];
pkgs = import nixpkgs {
inherit system;
overlays = [ rust-overlay.overlays.default solc.overlay ];
Expand All @@ -35,17 +33,15 @@
devShells.default = pkgs.mkShell {
nativeBuildInputs = with pkgs; [
pkg-config
libusb1
] ++ lib.optionals pkgs.stdenv.isDarwin [
pkgs.darwin.apple_sdk.frameworks.AppKit
];
buildInputs = [
pkgs.rust-analyzer-unwrapped
solc_0_8_23
(solc.mkDefault pkgs solc_0_8_23)
toolchain
];
buildInputs = lib.optionals pkgs.stdenv.isDarwin [
pkgs.darwin.apple_sdk.frameworks.AppKit
];
packages = with pkgs; [
solc_0_8_20
(solc.mkDefault pkgs solc_0_8_20)
rust-analyzer-unwrapped
];

# Environment variables
Expand Down

0 comments on commit 21c40c7

Please sign in to comment.