From 165a6d1ee8d4b55c4ec8c1adc1c40f66a27b810d Mon Sep 17 00:00:00 2001 From: HigherOrderLogic <73709188+HigherOrderLogic@users.noreply.github.com> Date: Wed, 17 Jun 2026 17:30:48 +1000 Subject: [PATCH] nix: remove `rust-overlay` input --- flake.lock | 23 +---------------------- flake.nix | 45 +++++++++++---------------------------------- 2 files changed, 12 insertions(+), 56 deletions(-) diff --git a/flake.lock b/flake.lock index c380d9f0..ccef03f8 100644 --- a/flake.lock +++ b/flake.lock @@ -18,28 +18,7 @@ }, "root": { "inputs": { - "nixpkgs": "nixpkgs", - "rust-overlay": "rust-overlay" - } - }, - "rust-overlay": { - "inputs": { - "nixpkgs": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1757989933, - "narHash": "sha256-9cpKYWWPCFhgwQTww8S94rTXgg8Q8ydFv9fXM6I8xQM=", - "owner": "oxalica", - "repo": "rust-overlay", - "rev": "8249aa3442fb9b45e615a35f39eca2fe5510d7c3", - "type": "github" - }, - "original": { - "owner": "oxalica", - "repo": "rust-overlay", - "type": "github" + "nixpkgs": "nixpkgs" } } }, diff --git a/flake.nix b/flake.nix index b3dd0cdf..8d20cb2d 100644 --- a/flake.nix +++ b/flake.nix @@ -2,22 +2,12 @@ { description = "Niri: A scrollable-tiling Wayland compositor."; - inputs = { - nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; - - # NOTE: This is not necessary for end users - # You can omit it with `inputs.rust-overlay.follows = ""` - rust-overlay = { - url = "github:oxalica/rust-overlay"; - inputs.nixpkgs.follows = "nixpkgs"; - }; - }; + inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; outputs = { self, nixpkgs, - rust-overlay, }: let revision = self.shortRev or self.dirtyShortRev or "unknown"; @@ -182,33 +172,20 @@ system: let pkgs = nixpkgsFor.${system}; - rust-bin = rust-overlay.lib.mkRustBin { } pkgs; + rustfmt' = pkgs.rustfmt.override { asNightly = true; }; inherit (self.packages.${system}) niri; in { default = pkgs.mkShell { - packages = [ - # We don't use the toolchain from nixpkgs - # because we prefer a nightly toolchain - # and we *require* a nightly rustfmt - (rust-bin.selectLatestNightlyWith ( - toolchain: - toolchain.default.override { - extensions = [ - # includes already: - # rustc - # cargo - # rust-std - # rust-docs - # rustfmt-preview - # clippy-preview - "rust-analyzer" - "rust-src" - ]; - } - )) - pkgs.cargo-insta - ]; + packages = builtins.attrValues { + inherit (pkgs) + rustc + cargo + clippy + cargo-insta + ; + inherit rustfmt'; + }; nativeBuildInputs = [ pkgs.rustPlatform.bindgenHook