mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-25 08:41:05 +00:00
refactor(nix): clean up with statix and deadnix
This commit is contained in:
parent
bb29e238b5
commit
7933cc656e
3 changed files with 8 additions and 9 deletions
10
flake.nix
10
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;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -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 = ../.;
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue