textlint-rule-period-in-list-item: repackage with fetchYarnDeps

This commit is contained in:
natsukium 2024-05-17 21:07:51 +09:00
parent 2aaa9011e1
commit e242a02edc
No known key found for this signature in database
GPG Key ID: 9EA45A31DB994C53
6 changed files with 83 additions and 23 deletions

View File

@ -0,0 +1,79 @@
{
lib,
stdenv,
fetchFromGitHub,
fetchYarnDeps,
fixup-yarn-lock,
nodejs,
yarn,
textlint,
textlint-rule-period-in-list-item,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "textlint-rule-period-in-list-item";
version = "1.0.1";
src = fetchFromGitHub {
owner = "textlint-rule";
repo = "textlint-rule-period-in-list-item";
rev = "refs/tags/v${finalAttrs.version}";
hash = "sha256-hAkueH5q5s0kmvKZiOrCxtfmoHtHH0U8cVLhQ7eoqT0=";
};
offlineCache = fetchYarnDeps {
yarnLock = "${finalAttrs.src}/yarn.lock";
hash = "sha256-4tVTR/Wpcr/nJrBhqV3AowwcUiFNiuohyKn6yQvorvc=";
};
nativeBuildInputs = [
fixup-yarn-lock
nodejs
yarn
];
configurePhase = ''
runHook preConfigure
export HOME=$(mktemp -d)
yarn config --offline set yarn-offline-mirror "$offlineCache"
fixup-yarn-lock yarn.lock
yarn --offline --frozen-lockfile --ignore-platform --ignore-scripts --no-progress --non-interactive install
patchShebangs node_modules
runHook postConfigure
'';
buildPhase = ''
runHook preBuild
yarn --offline build
runHook postBuild
'';
installPhase = ''
runHook preInstall
yarn --offline --production install
rm -r test
mkdir -p $out/lib/node_modules/textlint-rule-period-in-list-item
cp -r . $out/lib/node_modules/textlint-rule-period-in-list-item/
runHook postInstall
'';
passthru.tests = textlint.testPackages {
rule = textlint-rule-period-in-list-item;
testFile = ./test.md;
};
meta = {
description = "Textlint rule that check with or without period in list item";
homepage = "https://github.com/textlint-rule/textlint-rule-period-in-list-item";
changelog = "https://github.com/textlint-rule/textlint-rule-period-in-list-item/releases/tag/${finalAttrs.src.rev}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ natsukium ];
platforms = textlint.meta.platforms;
};
})

View File

@ -0,0 +1 @@
- item.

View File

@ -12,6 +12,7 @@
textlint-rule-diacritics,
textlint-rule-en-max-word-count,
textlint-rule-max-comma,
textlint-rule-period-in-list-item,
textlint-rule-preset-ja-technical-writing,
textlint-rule-stop-words,
textlint-rule-terminology,
@ -108,6 +109,7 @@ buildNpmPackage rec {
textlint-rule-diacritics
textlint-rule-en-max-word-count
textlint-rule-max-comma
textlint-rule-period-in-list-item
textlint-rule-preset-ja-technical-writing
textlint-rule-stop-words
textlint-rule-terminology

View File

@ -142,6 +142,7 @@ mapAliases {
inherit (pkgs) textlint-rule-diacritics; # Added 2024-05-16
inherit (pkgs) textlint-rule-en-max-word-count; # Added 2024-05-17
inherit (pkgs) textlint-rule-max-comma; # Added 2024-05-15
inherit (pkgs) textlint-rule-period-in-list-item; # Added 2024-05-17
inherit (pkgs) textlint-rule-stop-words; # Added 2024-05-17
inherit (pkgs) textlint-rule-terminology; # Added 2024-05-17
inherit (pkgs) textlint-rule-unexpanded-acronym; # Added 2024-05-17

View File

@ -224,7 +224,6 @@
, "textlint-rule-abbr-within-parentheses"
, "textlint-rule-common-misspellings"
, "textlint-rule-no-start-duplicated-conjunction"
, "textlint-rule-period-in-list-item"
, "thelounge-plugin-closepms"
, "thelounge-plugin-giphy"
, "thelounge-plugin-shortcuts"

View File

@ -93268,28 +93268,6 @@ in
bypassCache = true;
reconstructLock = true;
};
textlint-rule-period-in-list-item = nodeEnv.buildNodePackage {
name = "textlint-rule-period-in-list-item";
packageName = "textlint-rule-period-in-list-item";
version = "1.0.1";
src = fetchurl {
url = "https://registry.npmjs.org/textlint-rule-period-in-list-item/-/textlint-rule-period-in-list-item-1.0.1.tgz";
sha512 = "dNPa4WzePcgsz8A+CxFGQgKNZCEvjjwMCu3DFcpYB4eKuhcSISEiS/mvEO42oGAALJluYdYVZxN3yMD6XzkLBA==";
};
dependencies = [
sources."check-ends-with-period-3.0.2"
sources."emoji-regex-10.3.0"
];
buildInputs = globalBuildInputs;
meta = {
description = "textlint rule that check with or without period in list item.";
homepage = "https://github.com/textlint-rule/textlint-rule-period-in-list-item";
license = "MIT";
};
production = true;
bypassCache = true;
reconstructLock = true;
};
thelounge-plugin-closepms = nodeEnv.buildNodePackage {
name = "thelounge-plugin-closepms";
packageName = "thelounge-plugin-closepms";