yazi: init at 0.1.3
This commit is contained in:
parent
9d757ec498
commit
80018aaa29
2 changed files with 75 additions and 0 deletions
73
pkgs/applications/file-managers/yazi/default.nix
Normal file
73
pkgs/applications/file-managers/yazi/default.nix
Normal file
|
@ -0,0 +1,73 @@
|
|||
{ rustPlatform
|
||||
, fetchFromGitHub
|
||||
, lib
|
||||
|
||||
, makeWrapper
|
||||
, stdenv
|
||||
, Foundation
|
||||
|
||||
, withFile ? true
|
||||
, file
|
||||
, withJq ? true
|
||||
, jq
|
||||
, withPoppler ? true
|
||||
, poppler_utils
|
||||
, withUnar ? true
|
||||
, unar
|
||||
, withFfmpegthumbnailer ? true
|
||||
, ffmpegthumbnailer
|
||||
, withFd ? true
|
||||
, fd
|
||||
, withRipgrep ? true
|
||||
, ripgrep
|
||||
, withFzf ? true
|
||||
, fzf
|
||||
, withZoxide ? true
|
||||
, zoxide
|
||||
|
||||
, nix-update-script
|
||||
}:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "yazi";
|
||||
version = "0.1.3";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "sxyazi";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
hash = "sha256-IUE2846AltYyEefkavCJOEak9mW0wygojWsucwUEgh4=";
|
||||
};
|
||||
|
||||
cargoHash = "sha256-wwtdaReb+teXf+VDwqAqCbSy2qWI11IRlcygmWdaqF4=";
|
||||
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
buildInputs = lib.optionals stdenv.isDarwin [ Foundation ];
|
||||
|
||||
postInstall = with lib;
|
||||
let
|
||||
runtimePaths = [ ]
|
||||
++ optional withFile file
|
||||
++ optional withJq jq
|
||||
++ optional withPoppler poppler_utils
|
||||
++ optional withUnar unar
|
||||
++ optional withFfmpegthumbnailer ffmpegthumbnailer
|
||||
++ optional withFd fd
|
||||
++ optional withRipgrep ripgrep
|
||||
++ optional withFzf fzf
|
||||
++ optional withZoxide zoxide;
|
||||
in
|
||||
''
|
||||
wrapProgram $out/bin/yazi \
|
||||
--prefix PATH : "${makeBinPath runtimePaths}"
|
||||
'';
|
||||
|
||||
passthru.updateScript = nix-update-script { };
|
||||
|
||||
meta = with lib; {
|
||||
description = "Blazing fast terminal file manager written in Rust, based on async I/O";
|
||||
homepage = "https://github.com/sxyazi/yazi";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ xyenon matthiasbeyer ];
|
||||
};
|
||||
}
|
|
@ -42031,4 +42031,6 @@ with pkgs;
|
|||
wttrbar = callPackage ../applications/misc/wttrbar { };
|
||||
|
||||
wpm = callPackage ../applications/misc/wpm { };
|
||||
|
||||
yazi = callPackage ../applications/file-managers/yazi { inherit (darwin.apple_sdk.frameworks) Foundation; };
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue