diff --git a/flake.nix b/flake.nix index 94ba0378..4d2569ad 100644 --- a/flake.nix +++ b/flake.nix @@ -16,7 +16,7 @@ # Nixpkgs overlays overlays = [ rust-overlay.overlays.default - (final: prev: { + (final: _: { rustToolchain = final.rust-bin.stable.latest.default.override { extensions = [ "rust-src" ]; }; @@ -28,7 +28,7 @@ let pkgs = import nixpkgs { inherit system overlays; }; rev = self.shortRev or "dirty"; - date = (self.lastModifiedDate or self.lastModified or "19700101"); + date = self.lastModifiedDate or self.lastModified or "19700101"; version = (builtins.fromTOML (builtins.readFile ./yazi-fm/Cargo.toml)).package.version + "pre${builtins.substring 0 8 date}_${rev}"; @@ -49,9 +49,9 @@ // { overlays = rec { default = yazi; - yazi = final: prev: { - yazi-unwrapped = self.packages."${final.system}".yazi-unwrapped; - yazi = self.packages."${final.system}".yazi; + yazi = final: _: { + inherit (self.packages."${final.system}") yazi-unwrapped; + inherit (self.packages."${final.system}") yazi; }; }; }; diff --git a/nix/yazi-unwrapped.nix b/nix/yazi-unwrapped.nix index c1d7db1a..51d9da29 100644 --- a/nix/yazi-unwrapped.nix +++ b/nix/yazi-unwrapped.nix @@ -12,9 +12,9 @@ , imagemagick }: -(makeRustPlatform { cargo = rustToolchain; rustc = rustToolchain; }).buildRustPackage rec { +(makeRustPlatform { cargo = rustToolchain; rustc = rustToolchain; }).buildRustPackage { pname = "yazi"; - inherit version rev; + inherit version; src = ../.; diff --git a/nix/yazi.nix b/nix/yazi.nix index 3df2fe93..daa53d13 100644 --- a/nix/yazi.nix +++ b/nix/yazi.nix @@ -24,8 +24,7 @@ }: let - runtimePaths = with lib; [ ] - ++ optional withFile file + runtimePaths = with lib; optional withFile file ++ optional withJq jq ++ optional withPoppler poppler_utils ++ optional withUnar unar