readability-cli: modernize

This commit is contained in:
JuliusFreudenberger
2025-05-31 23:57:33 +03:00
parent c28426c4ef
commit 753cb51404
+6 -6
View File
@@ -5,21 +5,21 @@
installShellFiles,
}:
buildNpmPackage rec {
buildNpmPackage (finalAttrs: {
pname = "readability-cli";
version = "2.4.4";
src = fetchFromGitLab {
owner = "gardenappl";
repo = "readability-cli";
rev = "v${version}";
rev = "v${finalAttrs.version}";
hash = "sha256-pvAp3ZJ8/FPhrSMC8B4U1m5zuBNRP/HcsXkrW6QYgSQ=";
};
postPatch = ''
# Set a script name to avoid yargs using index.js as $0
substituteInPlace common.mjs \
--replace '.version(false)' '.version(false).scriptName("readable")'
--replace-fail '.version(false)' '.version(false).scriptName("readable")'
'';
npmDepsHash = "sha256-X1pcgDm8C4G+hIsgx3sAVFQPadWsULvXrdLAIHnpjmE=";
@@ -35,11 +35,11 @@ buildNpmPackage rec {
--zsh <(SHELL=zsh $out/bin/readable --completion)
'';
meta = with lib; {
meta = {
description = "Firefox Reader Mode in your terminal - get useful text from a web page using Mozilla's Readability library";
homepage = "https://gitlab.com/gardenappl/readability-cli";
license = licenses.gpl3Only;
license = lib.licenses.gpl3Only;
maintainers = [ ];
mainProgram = "readable";
};
}
})