From 21c40c73d672be6f7f4b0f5bf37a404d865ac83a Mon Sep 17 00:00:00 2001 From: Valentin B <703631+beeb@users.noreply.github.com> Date: Sun, 30 Jun 2024 16:16:39 +0200 Subject: [PATCH] chore: update dev shell flake (#8314) 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). --- flake.lock | 36 +++++++++++++++++++++++------------- flake.nix | 16 ++++++---------- 2 files changed, 29 insertions(+), 23 deletions(-) diff --git a/flake.lock b/flake.lock index 9ad80af8be7a..45ed6bb432ff 100644 --- a/flake.lock +++ b/flake.lock @@ -20,11 +20,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1711655175, - "narHash": "sha256-1xiaYhC3ul4y+i3eicYxeERk8ZkrNjLkrFSb/UW36Zw=", + "lastModified": 1719468428, + "narHash": "sha256-vN5xJAZ4UGREEglh3lfbbkIj+MPEYMuqewMn4atZFaQ=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "64c81edb4b97a51c5bbc54c191763ac71a6517ee", + "rev": "1e3deb3d8a86a870d925760db1a5adecc64d329d", "type": "github" }, "original": { @@ -44,19 +44,16 @@ }, "rust-overlay": { "inputs": { - "flake-utils": [ - "flake-utils" - ], "nixpkgs": [ "nixpkgs" ] }, "locked": { - "lastModified": 1711678273, - "narHash": "sha256-7lIB0hMRnfzx/9oSIwTnwXmVnbvVGRoadOCW+1HI5zY=", + "lastModified": 1719714047, + "narHash": "sha256-MeNPopLLv63EZj5L43j4TZkmW4wj1ouoc/h/E20sl/U=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "42a168449605950935f15ea546f6f770e5f7f629", + "rev": "cb216719ce89a43dfb3d1b86a9575e89f4b727a4", "type": "github" }, "original": { @@ -72,14 +69,15 @@ ], "nixpkgs": [ "nixpkgs" - ] + ], + "solc-macos-amd64-list-json": "solc-macos-amd64-list-json" }, "locked": { - "lastModified": 1711538161, - "narHash": "sha256-rETVdEIQ2PyEcNgzXXFSiYAYl0koCeGDIWp9XYBTxoQ=", + "lastModified": 1717442267, + "narHash": "sha256-6TnQvA6Q/xC3r1M+wGC5gnDc/5XfOPjC8X6LlGDWDNc=", "owner": "hellwolf", "repo": "solc.nix", - "rev": "a995838545a7383a0b37776e969743b1346d5479", + "rev": "2ac2862f224aa0d67cbc6b3246392489f8a50596", "type": "github" }, "original": { @@ -88,6 +86,18 @@ "type": "github" } }, + "solc-macos-amd64-list-json": { + "flake": false, + "locked": { + "narHash": "sha256-Prwz95BgMHcWd72VwVbcH17LsV9f24K2QMcUiWUQZzI=", + "type": "file", + "url": "https://github.com/ethereum/solc-bin/raw/f743ca7/macosx-amd64/list.json" + }, + "original": { + "type": "file", + "url": "https://github.com/ethereum/solc-bin/raw/f743ca7/macosx-amd64/list.json" + } + }, "systems": { "locked": { "lastModified": 1681028828, diff --git a/flake.nix b/flake.nix index 46ddb920c206..ff783b4956e4 100644 --- a/flake.nix +++ b/flake.nix @@ -6,7 +6,6 @@ url = "github:oxalica/rust-overlay"; inputs = { nixpkgs.follows = "nixpkgs"; - flake-utils.follows = "flake-utils"; }; }; solc = { @@ -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 ]; @@ -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