From 7acb83e5e4ce0a174ee6498acf78cae842d9d7cb Mon Sep 17 00:00:00 2001 From: Infinidoge Date: Wed, 16 Aug 2023 00:26:45 -0400 Subject: [PATCH] programming/rust: replace fenix with rust-overlay --- flake.lock | 98 +++++++++++++++++------------ flake.nix | 6 +- modules/global/programming/rust.nix | 14 ++--- 3 files changed, 66 insertions(+), 52 deletions(-) diff --git a/flake.lock b/flake.lock index f9a54b2..11913b5 100644 --- a/flake.lock +++ b/flake.lock @@ -48,12 +48,12 @@ "crane": { "inputs": { "flake-compat": "flake-compat_3", - "flake-utils": "flake-utils_4", + "flake-utils": "flake-utils_5", "nixpkgs": [ "universe-cli", "nixpkgs" ], - "rust-overlay": "rust-overlay" + "rust-overlay": "rust-overlay_2" }, "locked": { "lastModified": 1685896619, @@ -116,7 +116,7 @@ "universe-cli", "nixpkgs" ], - "systems": "systems_5" + "systems": "systems_6" }, "locked": { "lastModified": 1688380630, @@ -151,27 +151,6 @@ "type": "github" } }, - "fenix": { - "inputs": { - "nixpkgs": [ - "nixpkgs" - ], - "rust-analyzer-src": "rust-analyzer-src" - }, - "locked": { - "lastModified": 1690957271, - "narHash": "sha256-//ItnqqVI6M5nrnQbpZ/a93S65YosvSSn8ozqEQOgQo=", - "owner": "nix-community", - "repo": "fenix", - "rev": "90aba0cc6f4c30a8f4111a0c4baf548bae5d9510", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "fenix", - "type": "github" - } - }, "flake-compat": { "flake": false, "locked": { @@ -316,6 +295,24 @@ "inputs": { "systems": "systems_4" }, + "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" + } + }, + "flake-utils_5": { + "inputs": { + "systems": "systems_5" + }, "locked": { "lastModified": 1685518550, "narHash": "sha256-o2d0KcvaXzTrPRIo0kOLV0/QXHhDQ5DTi+OxcjO8xqY=", @@ -330,9 +327,9 @@ "type": "github" } }, - "flake-utils_5": { + "flake-utils_6": { "inputs": { - "systems": "systems_6" + "systems": "systems_7" }, "locked": { "lastModified": 1681202837, @@ -683,7 +680,6 @@ "inputs": { "agenix": "agenix", "devshell": "devshell", - "fenix": "fenix", "flake-parts": "flake-parts", "fork": "fork", "haumea": "haumea", @@ -697,27 +693,32 @@ "nixpkgs": "nixpkgs_4", "private": "private", "quick-nix-registry": "quick-nix-registry", + "rust-overlay": "rust-overlay", "universe-cli": "universe-cli" } }, - "rust-analyzer-src": { - "flake": false, + "rust-overlay": { + "inputs": { + "flake-utils": "flake-utils_4", + "nixpkgs": [ + "nixpkgs" + ] + }, "locked": { - "lastModified": 1690888982, - "narHash": "sha256-MQniEaKbxsewuXGo+DaFE1IODeodExYHolPhUTrMoLc=", - "owner": "rust-lang", - "repo": "rust-analyzer", - "rev": "151c750dac8d2a03a4a1f9c20d2fc29ad2042f02", + "lastModified": 1692151776, + "narHash": "sha256-nE3Z0bRcABHQq2RFC1RsUVnGCJS0Y5xhYUBY9amxgJA=", + "owner": "oxalica", + "repo": "rust-overlay", + "rev": "dea24da3d3be23ab53ee80314474afd5fcb03c1c", "type": "github" }, "original": { - "owner": "rust-lang", - "ref": "nightly", - "repo": "rust-analyzer", + "owner": "oxalica", + "repo": "rust-overlay", "type": "github" } }, - "rust-overlay": { + "rust-overlay_2": { "inputs": { "flake-utils": [ "universe-cli", @@ -744,9 +745,9 @@ "type": "github" } }, - "rust-overlay_2": { + "rust-overlay_3": { "inputs": { - "flake-utils": "flake-utils_5", + "flake-utils": "flake-utils_6", "nixpkgs": [ "universe-cli", "nixpkgs" @@ -856,6 +857,21 @@ "type": "github" } }, + "systems_7": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, "universe-cli": { "inputs": { "crane": "crane", @@ -864,7 +880,7 @@ "nixpkgs": [ "nixpkgs" ], - "rust-overlay": "rust-overlay_2" + "rust-overlay": "rust-overlay_3" }, "locked": { "lastModified": 1690510733, diff --git a/flake.nix b/flake.nix index f330bb2..d86a59a 100644 --- a/flake.nix +++ b/flake.nix @@ -46,8 +46,8 @@ nix-minecraft.inputs.nixpkgs.follows = "nixpkgs"; # # --- Rust - fenix.url = "github:nix-community/fenix"; - fenix.inputs.nixpkgs.follows = "nixpkgs"; + rust-overlay.url = "github:oxalica/rust-overlay"; + rust-overlay.inputs.nixpkgs.follows = "nixpkgs"; }; outputs = inputs@{ flake-parts, nixpkgs, private, ... }: flake-parts.lib.mkFlake { inherit inputs; } ({ self, lib, ... }: { @@ -107,7 +107,7 @@ # --- Domain-Specific Overlays inputs.agenix.overlays.default inputs.nix-minecraft.overlay - inputs.fenix.overlays.default + inputs.rust-overlay.overlays.default inputs.universe-cli.overlays.default ]; home-manager = diff --git a/modules/global/programming/rust.nix b/modules/global/programming/rust.nix index 54c3169..837c91e 100644 --- a/modules/global/programming/rust.nix +++ b/modules/global/programming/rust.nix @@ -1,13 +1,11 @@ { pkgs, ... }: { environment.systemPackages = with pkgs; [ - (fenix.complete.withComponents [ - "cargo" - "clippy" - "rust-src" - "rustc" - "rustfmt" - ]) - rust-analyzer-nightly + (rust-bin.selectLatestNightlyWith (toolchain: toolchain.default.override { + extensions = [ + "rust-src" + "rust-analyzer" + ]; + })) gcc ]; }