From e4f758c7b96e1786c7e44083bce53426edb6911c Mon Sep 17 00:00:00 2001 From: Nadir Ishiguro <23151917+nadir-ishiguro@users.noreply.github.com> Date: Mon, 5 May 2025 16:21:45 +0200 Subject: [PATCH] clifm: cleanup - add versionCheckHook - add nix-update-script - use finalAttrs - remove with lib - shorten description --- pkgs/by-name/cl/clifm/package.nix | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/pkgs/by-name/cl/clifm/package.nix b/pkgs/by-name/cl/clifm/package.nix index 4dba26a424d3..61398c22a792 100644 --- a/pkgs/by-name/cl/clifm/package.nix +++ b/pkgs/by-name/cl/clifm/package.nix @@ -7,16 +7,18 @@ file, readline, python3, + nix-update-script, + versionCheckHook, }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "clifm"; version = "1.25"; src = fetchFromGitHub { owner = "leo-arch"; repo = "clifm"; - rev = "v${version}"; + tag = "v${finalAttrs.version}"; hash = "sha256-Q4BzkLclJJGybx6tnOhfRE3X5iFtuYTfbAvSLO7isX4="; }; @@ -35,12 +37,18 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; - meta = with lib; { + nativeCheckInputs = [ versionCheckHook ]; + doCheck = true; + + passthru.updateScript = nix-update-script { }; + + meta = { homepage = "https://github.com/leo-arch/clifm"; - description = "CliFM is a CLI-based, shell-like, and non-curses terminal file manager written in C: simple, fast, extensible, and lightweight as hell"; - license = licenses.gpl2Plus; - maintainers = with maintainers; [ nadir-ishiguro ]; - platforms = platforms.unix; + changelog = "https://github.com/leo-arch/clifm/releases/tag/v${finalAttrs.version}"; + description = "A CLI-based, shell-like, and non-curses terminal file manager"; + license = lib.licenses.gpl2Plus; + maintainers = with lib.maintainers; [ nadir-ishiguro ]; + platforms = lib.platforms.unix; mainProgram = "clifm"; }; -} +})