From d145ee2b5caeb59ef94ca562ec1334cea80d0460 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Fri, 16 Jan 2026 15:27:06 +0100 Subject: [PATCH] drop rust-overlay, use rustc from nixpkgs nixpkgs has a recent enough rustc version, no need for the extra complexity of rust-overlay and rust-toolchain.toml. --- flake.lock | 23 +---------------------- flake.nix | 32 +++++++++----------------------- rust-toolchain.toml | 3 --- 3 files changed, 10 insertions(+), 48 deletions(-) delete mode 100644 rust-toolchain.toml diff --git a/flake.lock b/flake.lock index 223980b..8445fa1 100644 --- a/flake.lock +++ b/flake.lock @@ -39,28 +39,7 @@ "root": { "inputs": { "flake-parts": "flake-parts", - "nixpkgs": "nixpkgs", - "rust-overlay": "rust-overlay" - } - }, - "rust-overlay": { - "inputs": { - "nixpkgs": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1763087910, - "narHash": "sha256-eB9Z1mWd1U6N61+F8qwDggX0ihM55s4E0CluwNukJRU=", - "owner": "oxalica", - "repo": "rust-overlay", - "rev": "cf4a68749733d45c0420726596367acd708eb2e8", - "type": "github" - }, - "original": { - "owner": "oxalica", - "repo": "rust-overlay", - "type": "github" + "nixpkgs": "nixpkgs" } } }, diff --git a/flake.nix b/flake.nix index 47aa4b8..4602239 100644 --- a/flake.nix +++ b/flake.nix @@ -3,10 +3,6 @@ nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; flake-parts.url = "github:hercules-ci/flake-parts"; flake-parts.inputs.nixpkgs-lib.follows = "nixpkgs"; - rust-overlay = { - url = "github:oxalica/rust-overlay"; - inputs.nixpkgs.follows = "nixpkgs"; - }; }; outputs = @@ -18,35 +14,20 @@ ]; perSystem = - { - pkgs, - system, - ... - }: + { pkgs, ... }: let - overlays = [ (import inputs.rust-overlay) ]; - pkgs' = import inputs.nixpkgs { - inherit system overlays; - }; - buildEnvVars = { BIN_XDG_PERMISSION_STORE = "${pkgs.xdg-desktop-portal}/libexec/xdg-permission-store"; BIN_XDG_DOCUMENT_PORTAL = "${pkgs.xdg-desktop-portal}/libexec/xdg-document-portal"; BIN_VIRTIOFSD = "${pkgs.virtiofsd}/bin/virtiofsd"; }; - rustToolchain = pkgs'.pkgsBuildHost.rust-bin.fromRustupToolchainFile ./rust-toolchain.toml; - rustPlatform = pkgs'.makeRustPlatform { - cargo = rustToolchain; - rustc = rustToolchain; - }; - rustPackage = crate: let cargoToml = builtins.fromTOML (builtins.readFile ./${crate}/Cargo.toml); in - rustPlatform.buildRustPackage { + pkgs.rustPlatform.buildRustPackage { inherit (cargoToml.package) name version; src = ./.; cargoLock.lockFile = ./Cargo.lock; @@ -59,8 +40,13 @@ }; in { - devShells.default = pkgs'.mkShell { - buildInputs = [ rustToolchain ]; + devShells.default = pkgs.mkShell { + buildInputs = with pkgs; [ + cargo + rustc + rust-analyzer + clippy + ]; env = buildEnvVars; }; diff --git a/rust-toolchain.toml b/rust-toolchain.toml deleted file mode 100644 index a1de405..0000000 --- a/rust-toolchain.toml +++ /dev/null @@ -1,3 +0,0 @@ -[toolchain] -channel = "1.88.0" -components = ["rust-analyzer", "rust-src", "clippy"]