From 031529b167a9ab42fc9ffb0b8a029254ee903d6f Mon Sep 17 00:00:00 2001 From: David Dunn <26876072+doubledup@users.noreply.github.com> Date: Mon, 31 Jul 2023 13:50:15 -0400 Subject: [PATCH] Replace rust overlay with rustup package --- flake.lock | 71 +----------------------------------------------------- flake.nix | 12 ++++----- 2 files changed, 7 insertions(+), 76 deletions(-) diff --git a/flake.lock b/flake.lock index 56451a9d53..cfc607bc64 100644 --- a/flake.lock +++ b/flake.lock @@ -30,24 +30,6 @@ "type": "github" } }, - "flake-utils_3": { - "inputs": { - "systems": "systems" - }, - "locked": { - "lastModified": 1681202837, - "narHash": "sha256-H+Rh19JDwRtpVPAWp64F+rlEtxUWBAQW28eAi3SRSzg=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "cfacdce06f30d2b68473a46042957675eebb3401", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, "foundry": { "inputs": { "flake-utils": "flake-utils_2", @@ -97,62 +79,11 @@ "type": "indirect" } }, - "nixpkgs_3": { - "locked": { - "lastModified": 1681358109, - "narHash": "sha256-eKyxW4OohHQx9Urxi7TQlFBTDWII+F+x2hklDOQPB50=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "96ba1c52e54e74c3197f4d43026b3f3d92e83ff9", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, "root": { "inputs": { "flake-utils": "flake-utils", "foundry": "foundry", - "nixpkgs": "nixpkgs_2", - "rust-overlay": "rust-overlay" - } - }, - "rust-overlay": { - "inputs": { - "flake-utils": "flake-utils_3", - "nixpkgs": "nixpkgs_3" - }, - "locked": { - "lastModified": 1690683485, - "narHash": "sha256-Sp/QpbMg86v12xhCsa6q0yTH8LYaJIcxzbf9LO1zFzM=", - "owner": "oxalica", - "repo": "rust-overlay", - "rev": "05d480a7aef1aae1bfb67a39134dcf48c5322528", - "type": "github" - }, - "original": { - "owner": "oxalica", - "repo": "rust-overlay", - "type": "github" - } - }, - "systems": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" + "nixpkgs": "nixpkgs_2" } } }, diff --git a/flake.nix b/flake.nix index bac1052ca7..862c20590e 100644 --- a/flake.nix +++ b/flake.nix @@ -3,23 +3,23 @@ inputs = { nixpkgs.url = "nixpkgs/nixos-unstable"; - rust-overlay.url = "github:oxalica/rust-overlay"; flake-utils.url = "github:numtide/flake-utils"; foundry.url = "github:shazow/foundry.nix/monthly"; }; - outputs = { self, nixpkgs, rust-overlay, flake-utils, foundry }: + outputs = { self, nixpkgs, flake-utils, foundry }: + let supportedSystems = [ "aarch64-darwin" "x86_64-darwin" "x86_64-linux" ]; - overlays = [ (import rust-overlay) foundry.overlay ]; + overlays = [ foundry.overlay ]; in + flake-utils.lib.eachSystem supportedSystems (system: let pkgs = import nixpkgs { inherit system overlays; }; cwd = builtins.toString ./.; - rust = - pkgs.rust-bin.fromRustupToolchainFile "${cwd}/rust-toolchain.toml"; in + with pkgs; { devShells.default = pkgs.mkShell { @@ -65,7 +65,7 @@ gcc libiconv protobuf - rust + rustup cowsay ];