Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(nix): cleanup and switch to nixfmt-rfc-style #1376

Merged
merged 6 commits into from
Aug 1, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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" ];
};
Expand All @@ -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}";
Expand All @@ -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;
uncenter marked this conversation as resolved.
Show resolved Hide resolved
};
};
};
Expand Down
4 changes: 2 additions & 2 deletions nix/yazi-unwrapped.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 = ../.;

Expand Down
3 changes: 1 addition & 2 deletions nix/yazi.nix
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@
}:

let
runtimePaths = with lib; [ ]
++ optional withFile file
runtimePaths = with lib; optional withFile file
uncenter marked this conversation as resolved.
Show resolved Hide resolved
++ optional withJq jq
++ optional withPoppler poppler_utils
++ optional withUnar unar
Expand Down