From 4891878c1746a4186f340f0e1193acbccf89a243 Mon Sep 17 00:00:00 2001 From: Mikael Voss Date: Wed, 2 Apr 2025 21:26:54 +0200 Subject: [PATCH 1/3] eza: use finalAttrs pattern --- pkgs/by-name/ez/eza/package.nix | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pkgs/by-name/ez/eza/package.nix b/pkgs/by-name/ez/eza/package.nix index e94704b0e3ea..da3332090303 100644 --- a/pkgs/by-name/ez/eza/package.nix +++ b/pkgs/by-name/ez/eza/package.nix @@ -13,14 +13,14 @@ exaAlias ? true, }: -rustPlatform.buildRustPackage rec { +rustPlatform.buildRustPackage (finalAttrs: { pname = "eza"; version = "0.21.0"; src = fetchFromGitHub { owner = "eza-community"; repo = "eza"; - rev = "v${version}"; + rev = "v${finalAttrs.version}"; hash = "sha256-edBFMqY+61kFumLTcVFgnmhE4d+bMVz+udR5h02kDk0="; }; @@ -46,7 +46,7 @@ rustPlatform.buildRustPackage rec { postInstall = '' for page in eza.1 eza_colors.5 eza_colors-explanation.5; do - sed "s/\$version/v${version}/g" "man/$page.md" | + sed "s/\$version/v${finalAttrs.version}/g" "man/$page.md" | pandoc --standalone -f markdown -t man >"man/$page" done installManPage man/eza.1 man/eza_colors.5 man/eza_colors-explanation.5 @@ -70,7 +70,7 @@ rustPlatform.buildRustPackage rec { written in Rust, so it’s small, fast, and portable. ''; homepage = "https://github.com/eza-community/eza"; - changelog = "https://github.com/eza-community/eza/releases/tag/v${version}"; + changelog = "https://github.com/eza-community/eza/releases/tag/v${finalAttrs.version}"; license = licenses.eupl12; mainProgram = "eza"; maintainers = with maintainers; [ @@ -80,4 +80,4 @@ rustPlatform.buildRustPackage rec { ]; platforms = platforms.unix ++ platforms.windows; }; -} +}) From bd605f2feb477f5b72d2464950436770302f83f3 Mon Sep 17 00:00:00 2001 From: Mikael Voss Date: Wed, 2 Apr 2025 21:28:12 +0200 Subject: [PATCH 2/3] eza: remove use of with lib --- pkgs/by-name/ez/eza/package.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/by-name/ez/eza/package.nix b/pkgs/by-name/ez/eza/package.nix index da3332090303..d9071f8290d9 100644 --- a/pkgs/by-name/ez/eza/package.nix +++ b/pkgs/by-name/ez/eza/package.nix @@ -59,7 +59,7 @@ rustPlatform.buildRustPackage (finalAttrs: { ln -s eza $out/bin/exa ''; - meta = with lib; { + meta = { description = "Modern, maintained replacement for ls"; longDescription = '' eza is a modern replacement for ls. It uses colours for information by @@ -71,13 +71,13 @@ rustPlatform.buildRustPackage (finalAttrs: { ''; homepage = "https://github.com/eza-community/eza"; changelog = "https://github.com/eza-community/eza/releases/tag/v${finalAttrs.version}"; - license = licenses.eupl12; + license = lib.licenses.eupl12; mainProgram = "eza"; - maintainers = with maintainers; [ + maintainers = with lib.maintainers; [ cafkafk _9glenda sigmasquadron ]; - platforms = platforms.unix ++ platforms.windows; + platforms = with lib.platforms; unix ++ windows; }; }) From 825099787fbf7e362e8265649964355ff2bc6102 Mon Sep 17 00:00:00 2001 From: Mikael Voss Date: Fri, 4 Apr 2025 12:50:44 +0200 Subject: [PATCH 3/3] eza: use tag attribute for fetchFromGitHub --- pkgs/by-name/ez/eza/package.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/by-name/ez/eza/package.nix b/pkgs/by-name/ez/eza/package.nix index d9071f8290d9..1a4c30b169ac 100644 --- a/pkgs/by-name/ez/eza/package.nix +++ b/pkgs/by-name/ez/eza/package.nix @@ -20,7 +20,7 @@ rustPlatform.buildRustPackage (finalAttrs: { src = fetchFromGitHub { owner = "eza-community"; repo = "eza"; - rev = "v${finalAttrs.version}"; + tag = "v${finalAttrs.version}"; hash = "sha256-edBFMqY+61kFumLTcVFgnmhE4d+bMVz+udR5h02kDk0="; };