From e37d8d6bc149fc4b551107bd708cfcad53e33dd2 Mon Sep 17 00:00:00 2001 From: Fedi Jamoussi Date: Sat, 18 Jan 2025 10:10:51 +0000 Subject: [PATCH] fix(nix): rust overlay infinite recursion (#2216) --- flake.nix | 30 ++++++++++++++---------------- 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/flake.nix b/flake.nix index c6a11b0a0..88b7ac493 100644 --- a/flake.nix +++ b/flake.nix @@ -21,21 +21,12 @@ let pkgs = import nixpkgs { inherit system; - overlays = [ - rust-overlay.overlays.default - ( - final: prev: - let - toolchain = final.rust-bin.stable.latest.default; - in - { - rustPlatform = prev.makeRustPlatform { - cargo = toolchain; - rustc = toolchain; - }; - } - ) - ]; + overlays = [ rust-overlay.overlays.default ]; + }; + toolchain = pkgs.rust-bin.stable.latest.default; + rustPlatform = pkgs.makeRustPlatform { + cargo = toolchain; + rustc = toolchain; }; rev = self.shortRev or self.dirtyShortRev or "dirty"; @@ -46,7 +37,14 @@ in { packages = { - yazi-unwrapped = pkgs.callPackage ./nix/yazi-unwrapped.nix { inherit version rev date; }; + yazi-unwrapped = pkgs.callPackage ./nix/yazi-unwrapped.nix { + inherit + version + rev + date + rustPlatform + ; + }; yazi = pkgs.callPackage ./nix/yazi.nix { inherit (self.packages.${system}) yazi-unwrapped; }; default = self.packages.${system}.yazi; };