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
|
# Nixpkgs overlays
|
||||||
overlays = [
|
overlays = [
|
||||||
rust-overlay.overlays.default
|
rust-overlay.overlays.default
|
||||||
(final: prev: {
|
(final: _: {
|
||||||
rustToolchain = final.rust-bin.stable.latest.default.override {
|
rustToolchain = final.rust-bin.stable.latest.default.override {
|
||||||
extensions = [ "rust-src" ];
|
extensions = [ "rust-src" ];
|
||||||
};
|
};
|
||||||
|
|
@ -28,7 +28,7 @@
|
||||||
let
|
let
|
||||||
pkgs = import nixpkgs { inherit system overlays; };
|
pkgs = import nixpkgs { inherit system overlays; };
|
||||||
rev = self.shortRev or "dirty";
|
rev = self.shortRev or "dirty";
|
||||||
date = (self.lastModifiedDate or self.lastModified or "19700101");
|
date = self.lastModifiedDate or self.lastModified or "19700101";
|
||||||
version = (builtins.fromTOML
|
version = (builtins.fromTOML
|
||||||
(builtins.readFile ./yazi-fm/Cargo.toml)).package.version
|
(builtins.readFile ./yazi-fm/Cargo.toml)).package.version
|
||||||
+ "pre${builtins.substring 0 8 date}_${rev}";
|
+ "pre${builtins.substring 0 8 date}_${rev}";
|
||||||
|
|
@ -49,9 +49,9 @@
|
||||||
// {
|
// {
|
||||||
overlays = rec {
|
overlays = rec {
|
||||||
default = yazi;
|
default = yazi;
|
||||||
yazi = final: prev: {
|
yazi = final: _: {
|
||||||
yazi-unwrapped = self.packages."${final.system}".yazi-unwrapped;
|
inherit (self.packages."${final.system}") yazi-unwrapped;
|
||||||
yazi = self.packages."${final.system}".yazi;
|
inherit (self.packages."${final.system}") yazi;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -12,9 +12,9 @@
|
||||||
, imagemagick
|
, imagemagick
|
||||||
}:
|
}:
|
||||||
|
|
||||||
(makeRustPlatform { cargo = rustToolchain; rustc = rustToolchain; }).buildRustPackage rec {
|
(makeRustPlatform { cargo = rustToolchain; rustc = rustToolchain; }).buildRustPackage {
|
||||||
pname = "yazi";
|
pname = "yazi";
|
||||||
inherit version rev;
|
inherit version;
|
||||||
|
|
||||||
src = ../.;
|
src = ../.;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -24,8 +24,7 @@
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
runtimePaths = with lib; [ ]
|
runtimePaths = with lib; optional withFile file
|
||||||
++ optional withFile file
|
|
||||||
++ optional withJq jq
|
++ optional withJq jq
|
||||||
++ optional withPoppler poppler_utils
|
++ optional withPoppler poppler_utils
|
||||||
++ optional withUnar unar
|
++ optional withUnar unar
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue