From f5e1ef5c8c22afdbf85914d4d830e32eef9034b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20Bori?= Date: Wed, 25 Sep 2024 21:12:55 +0200 Subject: [PATCH] wikit: init at 4.4-unstable-2022-10-17 --- pkgs/by-name/wi/wikit/package.nix | 45 +++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 pkgs/by-name/wi/wikit/package.nix diff --git a/pkgs/by-name/wi/wikit/package.nix b/pkgs/by-name/wi/wikit/package.nix new file mode 100644 index 0000000000000..eef5237633c60 --- /dev/null +++ b/pkgs/by-name/wi/wikit/package.nix @@ -0,0 +1,45 @@ +{ + lib, + stdenv, + fetchFromGitHub, + fetchYarnDeps, + yarnConfigHook, + yarnInstallHook, + nodejs, +}: +stdenv.mkDerivation (finalAttrs: { + pname = "wikit"; + version = "4.4-unstable-2022-10-17"; + + src = fetchFromGitHub { + owner = "KorySchneider"; + repo = "wikit"; + rev = "6432c6020606868cc5f240d0317040e38b992292"; + hash = "sha256-WCKLqxNtO+iECfBzQwMn31Pcz/cGWMihTvoHPaQAmak="; + }; + + offlineCache = fetchYarnDeps { + yarnLock = "${finalAttrs.src}/yarn.lock"; + hash = "sha256-UAqMpb7zM/oVxE6gNkjk6IUoufATc0q2TM10P/A1Rqs="; + }; + + nativeBuildInputs = [ + yarnConfigHook + yarnInstallHook + nodejs + ]; + + postInstall = '' + mkdir -p $out/share/man/man1 + cp ${finalAttrs.src}/data/wikit.1 $out/share/man/man1 + ''; + + meta = { + description = "Wikit gives Wikipedia summaries from the terminal"; + homepage = "https://github.com/KorySchneider/wikit"; + changelog = "https://github.com/KorySchneider/wikit/releases"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ theobori ]; + mainProgram = "wikit"; + }; +})