diff --git a/flake.nix b/flake.nix index dec976185..b12dc5089 100644 --- a/flake.nix +++ b/flake.nix @@ -11,7 +11,7 @@ }; }; - outputs = { self, nixpkgs, flake-utils, rust-overlay, ... } @ inputs: + outputs = { self, nixpkgs, flake-utils, rust-overlay, ... }@inputs: let # Nixpkgs overlays overlays = [ @@ -22,15 +22,18 @@ }; }) ]; - in - flake-utils.lib.eachDefaultSystem (system: + in flake-utils.lib.eachDefaultSystem (system: let pkgs = import nixpkgs { inherit system overlays; }; - versionSuffix = "pre${builtins.substring 0 8 (self.lastModifiedDate or self.lastModified or "19700101")}_${self.shortRev or "dirty"}"; - version = (builtins.fromTOML (builtins.readFile ./yazi-fm/Cargo.toml)).package.version + versionSuffix; + versionSuffix = "pre${ + builtins.substring 0 8 + (self.lastModifiedDate or self.lastModified or "19700101") + }_${self.shortRev or "dirty"}"; + version = (builtins.fromTOML + (builtins.readFile ./yazi-fm/Cargo.toml)).package.version + + versionSuffix; yazi = pkgs.callPackage ./nix/yazi.nix { inherit version; }; - in - { + in { packages.default = yazi; packages.yazi = yazi; diff --git a/nix/shell.nix b/nix/shell.nix index ec9652b2c..f9dddafc4 100644 --- a/nix/shell.nix +++ b/nix/shell.nix @@ -2,7 +2,6 @@ pkgs.mkShell { packages = with pkgs; [ - rustToolchain rust-analyzer nodePackages.cspell @@ -16,13 +15,13 @@ pkgs.mkShell { ripgrep fzf zoxide + + (rust-bin.nightly.latest.rust.override { extensions = [ "rust-src" ]; }) ]; - buildInputs = with pkgs; lib.optionals stdenv.isDarwin ( - with darwin.apple_sdk.frameworks; [ Foundation ] - ); + buildInputs = with pkgs; + lib.optionals stdenv.isDarwin + (with darwin.apple_sdk.frameworks; [ Foundation ]); - env = { - RUST_BACKTRACE = "1"; - }; + env = { RUST_BACKTRACE = "1"; }; }