about summary refs log tree commit diff
path: root/pkgs/by-name/te
diff options
context:
space:
mode:
authorOTABI Tomoya <tomoya.otabi@gmail.com>2024-05-26 09:23:53 +0900
committerGitHub <noreply@github.com>2024-05-26 09:23:53 +0900
commit2e7b2517468533b04a4182db6ea1f29c935502b1 (patch)
tree47f18579cbe2bb3d08595147043e41f6a141688e /pkgs/by-name/te
parentb45ff4af4fe446655262f5b1585f71c9feb20ebd (diff)
parent5f58c6a87d8b20472d9a4fdfe12b2d09c0c6f575 (diff)
Merge pull request #312471 from natsukium/textlint/repackage
textlint: repackage with buildNpmPackage
Diffstat (limited to 'pkgs/by-name/te')
-rw-r--r--pkgs/by-name/te/textlint-plugin-latex2e/package.nix37
-rw-r--r--pkgs/by-name/te/textlint-plugin-latex2e/test.tex4
-rw-r--r--pkgs/by-name/te/textlint-rule-abbr-within-parentheses/package.nix79
-rw-r--r--pkgs/by-name/te/textlint-rule-abbr-within-parentheses/test.md1
-rw-r--r--pkgs/by-name/te/textlint-rule-alex/package.nix34
-rw-r--r--pkgs/by-name/te/textlint-rule-alex/test.md1
-rw-r--r--pkgs/by-name/te/textlint-rule-common-misspellings/package.nix135
-rw-r--r--pkgs/by-name/te/textlint-rule-common-misspellings/test.md1
-rw-r--r--pkgs/by-name/te/textlint-rule-diacritics/package.nix36
-rw-r--r--pkgs/by-name/te/textlint-rule-diacritics/test.md1
-rw-r--r--pkgs/by-name/te/textlint-rule-en-max-word-count/package.nix79
-rw-r--r--pkgs/by-name/te/textlint-rule-en-max-word-count/test.md1
-rw-r--r--pkgs/by-name/te/textlint-rule-max-comma/package.nix79
-rw-r--r--pkgs/by-name/te/textlint-rule-max-comma/test.md1
-rw-r--r--pkgs/by-name/te/textlint-rule-no-start-duplicated-conjunction/package.nix79
-rw-r--r--pkgs/by-name/te/textlint-rule-no-start-duplicated-conjunction/test.md3
-rw-r--r--pkgs/by-name/te/textlint-rule-period-in-list-item/package.nix79
-rw-r--r--pkgs/by-name/te/textlint-rule-period-in-list-item/test.md1
-rw-r--r--pkgs/by-name/te/textlint-rule-preset-ja-technical-writing/package.nix72
-rw-r--r--pkgs/by-name/te/textlint-rule-preset-ja-technical-writing/test.md1
-rw-r--r--pkgs/by-name/te/textlint-rule-stop-words/package.nix36
-rw-r--r--pkgs/by-name/te/textlint-rule-stop-words/test.md1
-rw-r--r--pkgs/by-name/te/textlint-rule-terminology/package.nix36
-rw-r--r--pkgs/by-name/te/textlint-rule-terminology/test.md1
-rw-r--r--pkgs/by-name/te/textlint-rule-unexpanded-acronym/package.nix79
-rw-r--r--pkgs/by-name/te/textlint-rule-unexpanded-acronym/test.md1
-rw-r--r--pkgs/by-name/te/textlint-rule-write-good/package.nix79
-rw-r--r--pkgs/by-name/te/textlint-rule-write-good/test.md1
-rw-r--r--pkgs/by-name/te/textlint/package.nix136
-rw-r--r--pkgs/by-name/te/textlint/remove-workspaces.patch19
30 files changed, 1113 insertions, 0 deletions
diff --git a/pkgs/by-name/te/textlint-plugin-latex2e/package.nix b/pkgs/by-name/te/textlint-plugin-latex2e/package.nix
new file mode 100644
index 0000000000000..5325d880a6386
--- /dev/null
+++ b/pkgs/by-name/te/textlint-plugin-latex2e/package.nix
@@ -0,0 +1,37 @@
+{
+  lib,
+  fetchFromGitHub,
+  buildNpmPackage,
+  textlint,
+  textlint-plugin-latex2e,
+  textlint-rule-max-comma,
+}:
+
+buildNpmPackage rec {
+  pname = "textlint-plugin-latex2e";
+  version = "1.2.1-unstable-2024-02-05";
+
+  src = fetchFromGitHub {
+    owner = "textlint";
+    repo = "textlint-plugin-latex2e";
+    rev = "d3ba1be14543aaaf8e52f87d103fafb3ebb7c4b0";
+    hash = "sha256-sCDpyhnznMAkIPWK0BawWZwuR9UO/ipIG2o5hyBkJQ0=";
+  };
+
+  npmDepsHash = "sha256-u2cMZC3s4iGCWG6iVMDYfb6XbxfjCdwpzl7opkwtrU8=";
+
+  passthru.tests = textlint.testPackages {
+    inherit (textlint-plugin-latex2e) pname;
+    rule = textlint-rule-max-comma;
+    plugin = textlint-plugin-latex2e;
+    testFile = ./test.tex;
+  };
+
+  meta = {
+    description = "Textlint Plugin LaTeX2ε";
+    homepage = "https://github.com/textlint/textlint-plugin-latex2e";
+    changelog = "https://github.com/textlint/textlint-plugin-latex2e/blob/${src.rev}/CHANGELOG.md";
+    license = lib.licenses.mit;
+    maintainers = with lib.maintainers; [ natsukium ];
+  };
+}
diff --git a/pkgs/by-name/te/textlint-plugin-latex2e/test.tex b/pkgs/by-name/te/textlint-plugin-latex2e/test.tex
new file mode 100644
index 0000000000000..98ec66816b6d5
--- /dev/null
+++ b/pkgs/by-name/te/textlint-plugin-latex2e/test.tex
@@ -0,0 +1,4 @@
+\documentclass{article}
+\begin{document}
+Nix, is a tool, that takes a unique approach to package management and system configuration, Learn how to make reproducible, declarative, and reliable systems.
+\end{document}
diff --git a/pkgs/by-name/te/textlint-rule-abbr-within-parentheses/package.nix b/pkgs/by-name/te/textlint-rule-abbr-within-parentheses/package.nix
new file mode 100644
index 0000000000000..96e3906930e26
--- /dev/null
+++ b/pkgs/by-name/te/textlint-rule-abbr-within-parentheses/package.nix
@@ -0,0 +1,79 @@
+{
+  lib,
+  stdenv,
+  fetchFromGitHub,
+  fetchYarnDeps,
+  fixup-yarn-lock,
+  nodejs,
+  yarn,
+  textlint,
+  textlint-rule-abbr-within-parentheses,
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "textlint-rule-abbr-within-parentheses";
+  version = "1.0.2";
+
+  src = fetchFromGitHub {
+    owner = "azu";
+    repo = "textlint-rule-abbr-within-parentheses";
+    rev = "refs/tags/${finalAttrs.version}";
+    hash = "sha256-CBrf7WtvywDmtuSyxkDtAyjmrj7KS3TQLSsNfMxeWXw=";
+  };
+
+  offlineCache = fetchYarnDeps {
+    yarnLock = "${finalAttrs.src}/yarn.lock";
+    hash = "sha256-N4tnja6qTo7jtn7Dh4TwBUCUKfbIbHvdZ7aeJcE+NlU=";
+  };
+
+  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-abbr-within-parentheses
+    cp -r . $out/lib/node_modules/textlint-rule-abbr-within-parentheses/
+
+    runHook postInstall
+  '';
+
+  passthru.tests = textlint.testPackages {
+    rule = textlint-rule-abbr-within-parentheses;
+    testFile = ./test.md;
+  };
+
+  meta = {
+    description = "Textlint rule check if write abbreviations within parentheses";
+    homepage = "https://github.com/azu/textlint-rule-abbr-within-parentheses";
+    changelog = "https://github.com/azu/textlint-rule-abbr-within-parentheses/releases/tag/${finalAttrs.src.rev}";
+    license = lib.licenses.mit;
+    maintainers = with lib.maintainers; [ natsukium ];
+    platforms = textlint.meta.platforms;
+  };
+})
diff --git a/pkgs/by-name/te/textlint-rule-abbr-within-parentheses/test.md b/pkgs/by-name/te/textlint-rule-abbr-within-parentheses/test.md
new file mode 100644
index 0000000000000..224b1703098b7
--- /dev/null
+++ b/pkgs/by-name/te/textlint-rule-abbr-within-parentheses/test.md
@@ -0,0 +1 @@
+Passing an expression `expr` that evaluates to a store path to any built-in function which reads from the filesystem constitutes IFD(Import From Derivation).
diff --git a/pkgs/by-name/te/textlint-rule-alex/package.nix b/pkgs/by-name/te/textlint-rule-alex/package.nix
new file mode 100644
index 0000000000000..343cd6da82179
--- /dev/null
+++ b/pkgs/by-name/te/textlint-rule-alex/package.nix
@@ -0,0 +1,34 @@
+{
+  lib,
+  fetchFromGitHub,
+  buildNpmPackage,
+  textlint,
+  textlint-rule-alex,
+}:
+
+buildNpmPackage rec {
+  pname = "textlint-rule-alex";
+  version = "5.0.0";
+
+  src = fetchFromGitHub {
+    owner = "textlint-rule";
+    repo = "textlint-rule-alex";
+    rev = "refs/tags/v${version}";
+    hash = "sha256-1JoiUhiRXZWIyLAJXp5ZzFAa/NBCN79jYh5kMNbO0jI=";
+  };
+
+  npmDepsHash = "sha256-ovDDiOZ415ubyDqbLNggzoVuqUWsRlG3zlhRW6xU3SQ=";
+
+  passthru.tests = textlint.testPackages {
+    rule = textlint-rule-alex;
+    testFile = ./test.md;
+  };
+
+  meta = {
+    description = "Textlint rule for alex";
+    homepage = "https://github.com/textlint-rule/textlint-rule-alex";
+    changelog = "https://github.com/textlint-rule/textlint-rule-alex/releases/tag/${src.rev}";
+    license = lib.licenses.mit;
+    maintainers = with lib.maintainers; [ natsukium ];
+  };
+}
diff --git a/pkgs/by-name/te/textlint-rule-alex/test.md b/pkgs/by-name/te/textlint-rule-alex/test.md
new file mode 100644
index 0000000000000..1e9915c7abde8
--- /dev/null
+++ b/pkgs/by-name/te/textlint-rule-alex/test.md
@@ -0,0 +1 @@
+A message for this sentence will pop up.
diff --git a/pkgs/by-name/te/textlint-rule-common-misspellings/package.nix b/pkgs/by-name/te/textlint-rule-common-misspellings/package.nix
new file mode 100644
index 0000000000000..ad17e2a91092e
--- /dev/null
+++ b/pkgs/by-name/te/textlint-rule-common-misspellings/package.nix
@@ -0,0 +1,135 @@
+{
+  lib,
+  stdenvNoCC,
+  fetchurl,
+  fetchFromGitHub,
+  fetchYarnDeps,
+  fixup-yarn-lock,
+  nodejs,
+  yarn,
+  textlint,
+  textlint-rule-common-misspellings,
+}:
+
+# there is no lock file in this package, but it is old and stable enough
+# so that we handle dependencies manually
+let
+  misspellings = stdenvNoCC.mkDerivation (finalAttrs: {
+    pname = "misspellings";
+    version = "1.1.0";
+
+    src = fetchurl {
+      url = "https://registry.npmjs.org/misspellings/-/misspellings-${finalAttrs.version}.tgz";
+      hash = "sha256-+4QxmGjoF0mBldN4XQMvoK8YDS4PBV9/c+/BPf4FbkM=";
+    };
+
+    dontBuild = true;
+
+    installPhase = ''
+      runHook preInstall
+
+      mkdir -p $out/lib/node_modules/misspellings
+      cp -r . $out/lib/node_modules/misspellings/
+
+      runHook postInstall
+    '';
+  });
+
+  textlint-rule-helper = stdenvNoCC.mkDerivation (finalAttrs: {
+    pname = "textlint-rule-helper";
+    version = "2.3.1";
+
+    src = fetchFromGitHub {
+      owner = "textlint";
+      repo = "textlint-rule-helper";
+      rev = "refs/tags/v${finalAttrs.version}";
+      hash = "sha256-SVeL/3KC/yazSGsmn5We8fJAuVqfcspzN7i2a4+EOlI=";
+    };
+
+    offlineCache = fetchYarnDeps {
+      yarnLock = "${finalAttrs.src}/yarn.lock";
+      hash = "sha256-UN56VuUHl7aS+QLON8ZROTSCGKKCn/8xuIkR46LyY+U=";
+    };
+
+    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-helper
+      cp -r . $out/lib/node_modules/textlint-rule-helper/
+
+      runHook postInstall
+    '';
+  });
+in
+stdenvNoCC.mkDerivation (finalAttrs: {
+  pname = "textlint-rule-common-misspellings";
+  version = "1.0.1";
+
+  src = fetchurl {
+    url = "https://registry.npmjs.org/textlint-rule-common-misspellings/-/textlint-rule-common-misspellings-${finalAttrs.version}.tgz";
+    hash = "sha256-5QVb5T2yGuunNhRQG5brJQyicRRbO8XewzjO2RzN0bI=";
+  };
+
+  dontBuild = true;
+
+  buildInputs = [
+    misspellings
+    textlint-rule-helper
+  ];
+
+  installPhase = ''
+    runHook preInstall
+
+    mkdir -p $out/lib/node_modules/textlint-rule-common-misspellings/node_modules/textlint-rule-helper
+    cp -r ${misspellings}/lib/node_modules/misspellings $out/lib/node_modules/textlint-rule-common-misspellings/node_modules/misspellings
+    cp -r ${textlint-rule-helper}/lib/node_modules/textlint-rule-helper/node_modules/* $out/lib/node_modules/textlint-rule-common-misspellings/node_modules
+    cp -r ${textlint-rule-helper}/lib/node_modules/textlint-rule-helper/lib $out/lib/node_modules/textlint-rule-common-misspellings/node_modules/textlint-rule-helper/lib
+    cp -r ${textlint-rule-helper}/lib/node_modules/textlint-rule-helper/package.json $out/lib/node_modules/textlint-rule-common-misspellings/node_modules/textlint-rule-helper/package.json
+
+    cp -r . $out/lib/node_modules/textlint-rule-common-misspellings/
+
+    runHook postInstall
+  '';
+
+  passthru.tests = textlint.testPackages {
+    rule = textlint-rule-common-misspellings;
+    testFile = ./test.md;
+  };
+
+  meta = {
+    description = "Textlint rule to check common misspellings";
+    homepage = "https://github.com/io-monad/textlint-rule-common-misspellings";
+    license = lib.licenses.gpl3Only;
+    maintainers = with lib.maintainers; [ natsukium ];
+    mainProgram = "textlint-rule-common-misspellings";
+    platforms = textlint.meta.platforms;
+  };
+})
diff --git a/pkgs/by-name/te/textlint-rule-common-misspellings/test.md b/pkgs/by-name/te/textlint-rule-common-misspellings/test.md
new file mode 100644
index 0000000000000..b0e84d77f2bdc
--- /dev/null
+++ b/pkgs/by-name/te/textlint-rule-common-misspellings/test.md
@@ -0,0 +1 @@
+`textlint-rule-common-misspellings` is an old and mature libary.
diff --git a/pkgs/by-name/te/textlint-rule-diacritics/package.nix b/pkgs/by-name/te/textlint-rule-diacritics/package.nix
new file mode 100644
index 0000000000000..95c11c40c30ce
--- /dev/null
+++ b/pkgs/by-name/te/textlint-rule-diacritics/package.nix
@@ -0,0 +1,36 @@
+{
+  lib,
+  fetchFromGitHub,
+  buildNpmPackage,
+  textlint,
+  textlint-rule-diacritics,
+}:
+
+buildNpmPackage rec {
+  pname = "textlint-rule-diacritics";
+  version = "1.0.0-unstable-2023-01-05";
+
+  src = fetchFromGitHub {
+    owner = "sapegin";
+    repo = "textlint-rule-diacritics";
+    rev = "07977d866aa6ce514bc6ed3a1087b2bb5869bfb4";
+    hash = "sha256-Zr+qWvgpLq3pzO4A7c+x4rTKkaSNO4t1gCiyJL3lkws=";
+  };
+
+  npmDepsHash = "sha256-bKA8aPVBYdzRPwCyFdEs3eWStJwswCZPVpsqGWwc42E=";
+
+  dontNpmBuild = true;
+
+  passthru.tests = textlint.testPackages {
+    rule = textlint-rule-diacritics;
+    testFile = ./test.md;
+  };
+
+  meta = {
+    description = "Textlint rule to check correct usage of diacritics";
+    homepage = "https://github.com/sapegin/textlint-rule-diacritics?tab=readme-ov-file";
+    changelog = "https://github.com/sapegin/textlint-rule-diacritics/releases/tag/${src.rev}";
+    license = lib.licenses.mit;
+    maintainers = with lib.maintainers; [ natsukium ];
+  };
+}
diff --git a/pkgs/by-name/te/textlint-rule-diacritics/test.md b/pkgs/by-name/te/textlint-rule-diacritics/test.md
new file mode 100644
index 0000000000000..84e58d5457415
--- /dev/null
+++ b/pkgs/by-name/te/textlint-rule-diacritics/test.md
@@ -0,0 +1 @@
+creme brulee
diff --git a/pkgs/by-name/te/textlint-rule-en-max-word-count/package.nix b/pkgs/by-name/te/textlint-rule-en-max-word-count/package.nix
new file mode 100644
index 0000000000000..893ed385dabb2
--- /dev/null
+++ b/pkgs/by-name/te/textlint-rule-en-max-word-count/package.nix
@@ -0,0 +1,79 @@
+{
+  lib,
+  stdenv,
+  fetchFromGitHub,
+  fetchYarnDeps,
+  fixup-yarn-lock,
+  nodejs,
+  yarn,
+  textlint,
+  textlint-rule-en-max-word-count,
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "textlint-rule-en-max-word-count";
+  version = "2.0.1";
+
+  src = fetchFromGitHub {
+    owner = "textlint-rule";
+    repo = "textlint-rule-en-max-word-count";
+    rev = "refs/tags/v${finalAttrs.version}";
+    hash = "sha256-ZZWN0PVHQBHcvJ53jDtD/6wLxBYmSHO7OXb5UQQAmyc=";
+  };
+
+  offlineCache = fetchYarnDeps {
+    yarnLock = "${finalAttrs.src}/yarn.lock";
+    hash = "sha256-3sEbvIfSaMz9pJalEKs7y05OVh+cKDg9jfLYmVyS53M=";
+  };
+
+  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-en-max-word-count
+    cp -r . $out/lib/node_modules/textlint-rule-en-max-word-count/
+
+    runHook postInstall
+  '';
+
+  passthru.tests = textlint.testPackages {
+    rule = textlint-rule-en-max-word-count;
+    testFile = ./test.md;
+  };
+
+  meta = {
+    description = "Textlint rule that specify the maximum word count of a sentence";
+    homepage = "https://github.com/textlint-rule/textlint-rule-en-max-word-count";
+    changelog = "https://github.com/textlint-rule/textlint-rule-en-max-word-count/releases/tag/${finalAttrs.src.rev}";
+    license = lib.licenses.mit;
+    maintainers = with lib.maintainers; [ natsukium ];
+    platforms = textlint.meta.platforms;
+  };
+})
diff --git a/pkgs/by-name/te/textlint-rule-en-max-word-count/test.md b/pkgs/by-name/te/textlint-rule-en-max-word-count/test.md
new file mode 100644
index 0000000000000..717096b6f3335
--- /dev/null
+++ b/pkgs/by-name/te/textlint-rule-en-max-word-count/test.md
@@ -0,0 +1 @@
+Nix is a tool that takes a unique approach to package management and system configuration, learn how to make reproducible declarative and reliable systems, Nix builds packages in isolation from each other, this ensures that they are reproducible and don’t have undeclared dependencies, so if a package works on one machine, it will also work on another.
diff --git a/pkgs/by-name/te/textlint-rule-max-comma/package.nix b/pkgs/by-name/te/textlint-rule-max-comma/package.nix
new file mode 100644
index 0000000000000..5afea41bd8c76
--- /dev/null
+++ b/pkgs/by-name/te/textlint-rule-max-comma/package.nix
@@ -0,0 +1,79 @@
+{
+  lib,
+  stdenv,
+  fetchFromGitHub,
+  fetchYarnDeps,
+  fixup-yarn-lock,
+  nodejs,
+  yarn,
+  textlint,
+  textlint-rule-max-comma,
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "textlint-rule-max-comma";
+  version = "4.0.0";
+
+  src = fetchFromGitHub {
+    owner = "textlint-rule";
+    repo = "textlint-rule-max-comma";
+    rev = "refs/tags/v${finalAttrs.version}";
+    hash = "sha256-Sf7ehhEOcy1HdgnIra8darkucF6RebQQV/NfJtft/DA=";
+  };
+
+  offlineCache = fetchYarnDeps {
+    yarnLock = "${finalAttrs.src}/yarn.lock";
+    hash = "sha256-jSsVQhvmc5mJ1gh6I5UaLvdz+HpaXI0fXFX0KCh01/c=";
+  };
+
+  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-max-comma
+    cp -r . $out/lib/node_modules/textlint-rule-max-comma/
+
+    runHook postInstall
+  '';
+
+  passthru.tests = textlint.testPackages {
+    rule = textlint-rule-max-comma;
+    testFile = ./test.md;
+  };
+
+  meta = {
+    description = "Textlint rule is that limit maximum comma(,) count of sentence";
+    homepage = "https://github.com/textlint-rule/textlint-rule-max-comma";
+    changelog = "https://github.com/textlint-rule/textlint-rule-max-comma/releases/tag/${finalAttrs.src.rev}";
+    license = lib.licenses.mit;
+    maintainers = with lib.maintainers; [ natsukium ];
+    platforms = textlint.meta.platforms;
+  };
+})
diff --git a/pkgs/by-name/te/textlint-rule-max-comma/test.md b/pkgs/by-name/te/textlint-rule-max-comma/test.md
new file mode 100644
index 0000000000000..9223245ad977f
--- /dev/null
+++ b/pkgs/by-name/te/textlint-rule-max-comma/test.md
@@ -0,0 +1 @@
+Nix, is a tool, that takes a unique approach to package management and system configuration, Learn how to make reproducible, declarative, and reliable systems.
diff --git a/pkgs/by-name/te/textlint-rule-no-start-duplicated-conjunction/package.nix b/pkgs/by-name/te/textlint-rule-no-start-duplicated-conjunction/package.nix
new file mode 100644
index 0000000000000..1390e9ac54b12
--- /dev/null
+++ b/pkgs/by-name/te/textlint-rule-no-start-duplicated-conjunction/package.nix
@@ -0,0 +1,79 @@
+{
+  lib,
+  stdenv,
+  fetchFromGitHub,
+  fetchYarnDeps,
+  fixup-yarn-lock,
+  nodejs,
+  yarn,
+  textlint,
+  textlint-rule-no-start-duplicated-conjunction,
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "textlint-rule-no-start-duplicated-conjunction";
+  version = "2.0.2";
+
+  src = fetchFromGitHub {
+    owner = "textlint-rule";
+    repo = "textlint-rule-no-start-duplicated-conjunction";
+    rev = "refs/tags/${finalAttrs.version}";
+    hash = "sha256-DtuCkHy440j2VI/JDJGrW2M8alQ8pxllfIZfB4+9z3U=";
+  };
+
+  offlineCache = fetchYarnDeps {
+    yarnLock = "${finalAttrs.src}/yarn.lock";
+    hash = "sha256-+3SJQgOG5bYSmNWbxsFNEEtKtCg8V04MIk6FhHwOZMo=";
+  };
+
+  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-no-start-duplicated-conjunction
+    cp -r . $out/lib/node_modules/textlint-rule-no-start-duplicated-conjunction/
+
+    runHook postInstall
+  '';
+
+  passthru.tests = textlint.testPackages {
+    rule = textlint-rule-no-start-duplicated-conjunction;
+    testFile = ./test.md;
+  };
+
+  meta = {
+    description = "Textlint rule that check no start with duplicated conjunction";
+    homepage = "https://github.com/textlint-rule/textlint-rule-no-start-duplicated-conjunction";
+    changelog = "https://github.com/textlint-rule/textlint-rule-no-start-duplicated-conjunction/releases/tag/${finalAttrs.src.rev}";
+    license = lib.licenses.mit;
+    maintainers = with lib.maintainers; [ natsukium ];
+    platforms = textlint.meta.platforms;
+  };
+})
diff --git a/pkgs/by-name/te/textlint-rule-no-start-duplicated-conjunction/test.md b/pkgs/by-name/te/textlint-rule-no-start-duplicated-conjunction/test.md
new file mode 100644
index 0000000000000..41c8f499942e2
--- /dev/null
+++ b/pkgs/by-name/te/textlint-rule-no-start-duplicated-conjunction/test.md
@@ -0,0 +1,3 @@
+But, A is ~.
+So, A is ~.
+But, A is ~.
diff --git a/pkgs/by-name/te/textlint-rule-period-in-list-item/package.nix b/pkgs/by-name/te/textlint-rule-period-in-list-item/package.nix
new file mode 100644
index 0000000000000..22397ccc42ff3
--- /dev/null
+++ b/pkgs/by-name/te/textlint-rule-period-in-list-item/package.nix
@@ -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;
+  };
+})
diff --git a/pkgs/by-name/te/textlint-rule-period-in-list-item/test.md b/pkgs/by-name/te/textlint-rule-period-in-list-item/test.md
new file mode 100644
index 0000000000000..69e2e71328746
--- /dev/null
+++ b/pkgs/by-name/te/textlint-rule-period-in-list-item/test.md
@@ -0,0 +1 @@
+- item.
diff --git a/pkgs/by-name/te/textlint-rule-preset-ja-technical-writing/package.nix b/pkgs/by-name/te/textlint-rule-preset-ja-technical-writing/package.nix
new file mode 100644
index 0000000000000..2123a088feb63
--- /dev/null
+++ b/pkgs/by-name/te/textlint-rule-preset-ja-technical-writing/package.nix
@@ -0,0 +1,72 @@
+{
+  lib,
+  stdenv,
+  fetchFromGitHub,
+  fetchYarnDeps,
+  fixup-yarn-lock,
+  nodejs,
+  yarn,
+  textlint,
+  textlint-rule-preset-ja-technical-writing,
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "textlint-rule-preset-ja-technical-writing";
+  version = "10.0.1";
+
+  src = fetchFromGitHub {
+    owner = "textlint-ja";
+    repo = "textlint-rule-preset-ja-technical-writing";
+    rev = "refs/tags/v${finalAttrs.version}";
+    hash = "sha256-8KoP/JagMf2kFxz8hr9e0hJH7yPukRURb48v0nPkC/8=";
+  };
+
+  offlineCache = fetchYarnDeps {
+    yarnLock = "${finalAttrs.src}/yarn.lock";
+    hash = "sha256-jm+8XK1E60D1AgYBnlKL0fkAWnn68z2PhCK7T/XbUgk=";
+  };
+
+  nativeBuildInputs = [
+    nodejs
+    fixup-yarn-lock
+    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
+  '';
+
+  dontBuild = true;
+
+  installPhase = ''
+    runHook preInstall
+
+    yarn --offline --production install
+    mkdir -p $out/lib/node_modules/textlint-rule-preset-ja-technical-writing
+    cp -r . $out/lib/node_modules/textlint-rule-preset-ja-technical-writing
+
+    runHook postInstall
+  '';
+
+  passthru.tests = textlint.testPackages {
+    rule = textlint-rule-preset-ja-technical-writing;
+    testFile = ./test.md;
+  };
+
+  meta = {
+    description = "技術文書向けのtextlintルールプリセット";
+    homepage = "https://github.com/textlint-ja/textlint-rule-preset-ja-technical-writing";
+    changelog = "https://github.com/textlint-ja/textlint-rule-preset-ja-technical-writing/blob/${finalAttrs.src.rev}/CHANGELOG.md";
+    license = lib.licenses.mit;
+    maintainers = with lib.maintainers; [ natsukium ];
+    platforms = textlint.meta.platforms;
+  };
+})
diff --git a/pkgs/by-name/te/textlint-rule-preset-ja-technical-writing/test.md b/pkgs/by-name/te/textlint-rule-preset-ja-technical-writing/test.md
new file mode 100644
index 0000000000000..880cf56c5dd2d
--- /dev/null
+++ b/pkgs/by-name/te/textlint-rule-preset-ja-technical-writing/test.md
@@ -0,0 +1 @@
+ニックスはいいぞ
diff --git a/pkgs/by-name/te/textlint-rule-stop-words/package.nix b/pkgs/by-name/te/textlint-rule-stop-words/package.nix
new file mode 100644
index 0000000000000..f2fa8ca901cc2
--- /dev/null
+++ b/pkgs/by-name/te/textlint-rule-stop-words/package.nix
@@ -0,0 +1,36 @@
+{
+  lib,
+  fetchFromGitHub,
+  buildNpmPackage,
+  textlint,
+  textlint-rule-stop-words,
+}:
+
+buildNpmPackage rec {
+  pname = "textlint-rule-stop-words";
+  version = "5.0.0";
+
+  src = fetchFromGitHub {
+    owner = "sapegin";
+    repo = "textlint-rule-stop-words";
+    rev = "refs/tags/v${version}";
+    hash = "sha256-e9jTbDULOs0DwtT9UZp7k5+RR5Ab/x/sizIvs1MrmZs=";
+  };
+
+  npmDepsHash = "sha256-t9PPHFIiY4vw0ocw6nMuaeYuYWxbc1Pzo0R6bqIsHeI=";
+
+  dontNpmBuild = true;
+
+  passthru.tests = textlint.testPackages {
+    rule = textlint-rule-stop-words;
+    testFile = ./test.md;
+  };
+
+  meta = {
+    description = "Textlint rule to find filler words, buzzwords and clichés";
+    homepage = "https://github.com/sapegin/textlint-rule-stop-words";
+    changelog = "https://github.com/sapegin/textlint-rule-stop-words/releases/tag/${src.rev}";
+    license = lib.licenses.mit;
+    maintainers = with lib.maintainers; [ natsukium ];
+  };
+}
diff --git a/pkgs/by-name/te/textlint-rule-stop-words/test.md b/pkgs/by-name/te/textlint-rule-stop-words/test.md
new file mode 100644
index 0000000000000..7cd8fc64f6259
--- /dev/null
+++ b/pkgs/by-name/te/textlint-rule-stop-words/test.md
@@ -0,0 +1 @@
+and etc.
diff --git a/pkgs/by-name/te/textlint-rule-terminology/package.nix b/pkgs/by-name/te/textlint-rule-terminology/package.nix
new file mode 100644
index 0000000000000..ac6ab2dd8ff06
--- /dev/null
+++ b/pkgs/by-name/te/textlint-rule-terminology/package.nix
@@ -0,0 +1,36 @@
+{
+  lib,
+  fetchFromGitHub,
+  buildNpmPackage,
+  textlint,
+  textlint-rule-terminology,
+}:
+
+buildNpmPackage rec {
+  pname = "textlint-rule-terminology";
+  version = "5.0.0";
+
+  src = fetchFromGitHub {
+    owner = "sapegin";
+    repo = "textlint-rule-terminology";
+    rev = "refs/tags/v${version}";
+    hash = "sha256-/NuKZSugizP4b2LFNqPrTvoXNE4D1sytU2B7T40ZASQ=";
+  };
+
+  npmDepsHash = "sha256-FQr7E6ZSJxj/ide+3JJwc27x15L1bAIAlPnMl8hdQ8w=";
+
+  dontNpmBuild = true;
+
+  passthru.tests = textlint.testPackages {
+    rule = textlint-rule-terminology;
+    testFile = ./test.md;
+  };
+
+  meta = {
+    description = "Textlint rule to check correct terms spelling";
+    homepage = "https://github.com/sapegin/textlint-rule-terminology";
+    changelog = "https://github.com/sapegin/textlint-rule-terminology/releases/tag/${src.rev}";
+    license = lib.licenses.mit;
+    maintainers = with lib.maintainers; [ natsukium ];
+  };
+}
diff --git a/pkgs/by-name/te/textlint-rule-terminology/test.md b/pkgs/by-name/te/textlint-rule-terminology/test.md
new file mode 100644
index 0000000000000..7c64883b9352d
--- /dev/null
+++ b/pkgs/by-name/te/textlint-rule-terminology/test.md
@@ -0,0 +1 @@
+Javascript
diff --git a/pkgs/by-name/te/textlint-rule-unexpanded-acronym/package.nix b/pkgs/by-name/te/textlint-rule-unexpanded-acronym/package.nix
new file mode 100644
index 0000000000000..a0a7cc87bff04
--- /dev/null
+++ b/pkgs/by-name/te/textlint-rule-unexpanded-acronym/package.nix
@@ -0,0 +1,79 @@
+{
+  lib,
+  stdenv,
+  fetchFromGitHub,
+  fetchYarnDeps,
+  fixup-yarn-lock,
+  nodejs,
+  yarn,
+  textlint,
+  textlint-rule-unexpanded-acronym,
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "textlint-rule-unexpanded-acronym";
+  version = "1.2.4";
+
+  src = fetchFromGitHub {
+    owner = "textlint-rule";
+    repo = "textlint-rule-unexpanded-acronym";
+    rev = "refs/tags/${finalAttrs.version}";
+    hash = "sha256-oUOofYfdENRQnwmBDADQgA1uGtRirqqGg8T+QA0LCXY=";
+  };
+
+  offlineCache = fetchYarnDeps {
+    yarnLock = "${finalAttrs.src}/yarn.lock";
+    hash = "sha256-90ZONfn7CnrCsYGliF+c7Ss+SgVmaCYnaVdq3s1HdJU=";
+  };
+
+  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-unexpanded-acronym
+    cp -r . $out/lib/node_modules/textlint-rule-unexpanded-acronym/
+
+    runHook postInstall
+  '';
+
+  passthru.tests = textlint.testPackages {
+    rule = textlint-rule-unexpanded-acronym;
+    testFile = ./test.md;
+  };
+
+  meta = {
+    description = "Textlint rule that check unexpanded acronym";
+    homepage = "https://github.com/textlint-rule/textlint-rule-unexpanded-acronym";
+    changelog = "https://github.com/textlint-rule/textlint-rule-unexpanded-acronym/releases/tag/${finalAttrs.src.rev}";
+    license = lib.licenses.mit;
+    maintainers = with lib.maintainers; [ natsukium ];
+    platforms = textlint.meta.platforms;
+  };
+})
diff --git a/pkgs/by-name/te/textlint-rule-unexpanded-acronym/test.md b/pkgs/by-name/te/textlint-rule-unexpanded-acronym/test.md
new file mode 100644
index 0000000000000..06b7ca62cea5e
--- /dev/null
+++ b/pkgs/by-name/te/textlint-rule-unexpanded-acronym/test.md
@@ -0,0 +1 @@
+Passing an expression `expr` that evaluates to a store path to any built-in function which reads from the filesystem constitutes IFD.
diff --git a/pkgs/by-name/te/textlint-rule-write-good/package.nix b/pkgs/by-name/te/textlint-rule-write-good/package.nix
new file mode 100644
index 0000000000000..feec3ced6ea9f
--- /dev/null
+++ b/pkgs/by-name/te/textlint-rule-write-good/package.nix
@@ -0,0 +1,79 @@
+{
+  lib,
+  stdenv,
+  fetchFromGitHub,
+  fetchYarnDeps,
+  fixup-yarn-lock,
+  nodejs,
+  yarn,
+  textlint,
+  textlint-rule-write-good,
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "textlint-rule-write-good";
+  version = "2.0.0-unstable-2024-05-02";
+
+  src = fetchFromGitHub {
+    owner = "textlint-rule";
+    repo = "textlint-rule-write-good";
+    rev = "586afa0989ae9ac8a93436f58a24d99afe1cac21";
+    hash = "sha256-ghEmWkwGVvLMy6Gf7IrariDRNfuNBc9EVOQz5w38g0I=";
+  };
+
+  offlineCache = fetchYarnDeps {
+    yarnLock = "${finalAttrs.src}/yarn.lock";
+    hash = "sha256-J02MoKPEYtehQMSaOR1Ytfme1ffgHbQcNnEENeTaxaA=";
+  };
+
+  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-write-good
+    cp -r . $out/lib/node_modules/textlint-rule-write-good/
+
+    runHook postInstall
+  '';
+
+  passthru.tests = textlint.testPackages {
+    rule = textlint-rule-write-good;
+    testFile = ./test.md;
+  };
+
+  meta = {
+    description = "Textlint rule to check your English styles with write-good";
+    homepage = "https://github.com/textlint-rule/textlint-rule-write-good";
+    changelog = "https://github.com/textlint-rule/textlint-rule-write-good/releases/tag/${finalAttrs.src.rev}";
+    license = lib.licenses.mit;
+    maintainers = with lib.maintainers; [ natsukium ];
+    platforms = textlint.meta.platforms;
+  };
+})
diff --git a/pkgs/by-name/te/textlint-rule-write-good/test.md b/pkgs/by-name/te/textlint-rule-write-good/test.md
new file mode 100644
index 0000000000000..6615a6f67a8fe
--- /dev/null
+++ b/pkgs/by-name/te/textlint-rule-write-good/test.md
@@ -0,0 +1 @@
+So the cat was stolen.
diff --git a/pkgs/by-name/te/textlint/package.nix b/pkgs/by-name/te/textlint/package.nix
new file mode 100644
index 0000000000000..8fea962d8e720
--- /dev/null
+++ b/pkgs/by-name/te/textlint/package.nix
@@ -0,0 +1,136 @@
+{
+  lib,
+  buildNpmPackage,
+  fetchFromGitHub,
+  autoconf,
+  automake,
+  makeWrapper,
+  runCommand,
+  textlint,
+  textlint-plugin-latex2e,
+  textlint-rule-abbr-within-parentheses,
+  textlint-rule-alex,
+  textlint-rule-common-misspellings,
+  textlint-rule-diacritics,
+  textlint-rule-en-max-word-count,
+  textlint-rule-max-comma,
+  textlint-rule-no-start-duplicated-conjunction,
+  textlint-rule-period-in-list-item,
+  textlint-rule-preset-ja-technical-writing,
+  textlint-rule-stop-words,
+  textlint-rule-terminology,
+  textlint-rule-unexpanded-acronym,
+  textlint-rule-write-good,
+}:
+
+buildNpmPackage rec {
+  pname = "textlint";
+  version = "14.0.4";
+
+  src = fetchFromGitHub {
+    owner = "textlint";
+    repo = "textlint";
+    rev = "refs/tags/v${version}";
+    hash = "sha256-u8BRzfvpZ8xggJwH8lsu+hqsql6s4SZVlkFzLBe6zvE=";
+  };
+
+  patches = [
+    # this package uses lerna and requires building many workspaces.
+    # this patch removes unnecessary workspaces,
+    # reducing package size and build time.
+    ./remove-workspaces.patch
+  ];
+
+  npmDepsHash = "sha256-rmRtCP51rt/wd/ef0iwMMI6eCGF1KNN7kJqomitMJ+w=";
+
+  nativeBuildInputs = [
+    autoconf
+    automake
+  ];
+
+  installPhase = ''
+    runHook preInstall
+
+    mkdir -p $out/{bin,lib}
+
+    npm prune --omit=dev --no-save
+    rm -r node_modules/.cache
+    rm -r packages/textlint-{scripts,tester}
+    rm -r packages/@textlint/*/test
+
+    cp -r node_modules $out/lib
+    cp -r packages $out/lib
+    ln -s $out/lib/node_modules/textlint/bin/textlint.js $out/bin/textlint
+
+    runHook postInstall
+  '';
+
+  passthru = {
+    withPackages =
+      ps:
+      runCommand "textlint-with-packages" { nativeBuildInputs = [ makeWrapper ]; } ''
+        makeWrapper ${textlint}/bin/textlint $out/bin/textlint \
+          --set NODE_PATH ${lib.makeSearchPath "lib/node_modules" ps}
+      '';
+
+    testPackages =
+      {
+        rule,
+        testFile,
+        pname ? rule.pname,
+        plugin ? null,
+      }:
+      let
+        ruleName = lib.removePrefix "textlint-rule-" rule.pname;
+        isPreset = lib.hasPrefix "preset-" ruleName;
+        ruleName' = lib.removePrefix "preset-" ruleName;
+        pluginName = lib.removePrefix "textlint-plugin-" plugin.pname;
+        args =
+          "${testFile} ${if isPreset then "--preset" else "--rule"} ${ruleName'}"
+          + lib.optionalString (plugin != null) " --plugin ${pluginName}";
+      in
+      {
+        "${pname}-test" =
+          runCommand "${pname}-test"
+            {
+              nativeBuildInputs = [
+                (textlint.withPackages [
+                  rule
+                  plugin
+                ])
+              ];
+            }
+            ''
+              grep ${ruleName'} <(textlint ${args}) > $out
+            '';
+      };
+
+    tests = lib.mergeAttrsList (
+      map (package: package.tests) [
+        textlint-plugin-latex2e
+        textlint-rule-abbr-within-parentheses
+        textlint-rule-alex
+        textlint-rule-common-misspellings
+        textlint-rule-diacritics
+        textlint-rule-en-max-word-count
+        textlint-rule-max-comma
+        textlint-rule-no-start-duplicated-conjunction
+        textlint-rule-period-in-list-item
+        textlint-rule-preset-ja-technical-writing
+        textlint-rule-stop-words
+        textlint-rule-terminology
+        textlint-rule-unexpanded-acronym
+        textlint-rule-write-good
+      ]
+    );
+  };
+
+  meta = {
+    description = "The pluggable natural language linter for text and markdown";
+    homepage = "https://github.com/textlint/textlint";
+    changelog = "https://github.com/textlint/textlint/blob/${src.rev}/CHANGELOG.md";
+    license = lib.licenses.mit;
+    maintainers = with lib.maintainers; [ natsukium ];
+    mainProgram = "textlint";
+  };
+}
diff --git a/pkgs/by-name/te/textlint/remove-workspaces.patch b/pkgs/by-name/te/textlint/remove-workspaces.patch
new file mode 100644
index 0000000000000..3e949e7906dee
--- /dev/null
+++ b/pkgs/by-name/te/textlint/remove-workspaces.patch
@@ -0,0 +1,19 @@
+diff --git a/package.json b/package.json
+index 9dd7fdc6..c5e74f88 100644
+--- a/package.json
++++ b/package.json
+@@ -56,12 +56,8 @@
+     "trailingComma": "none"
+   },
+   "workspaces": [
+-    "packages/*",
+-    "examples/*",
+-    "packages/@textlint/*",
+-    "packages/textlint-scripts/examples/*",
+-    "test/*",
+-    "website"
++    "packages/textlint",
++    "packages/@textlint/*"
+   ],
+   "packageManager": "npm@9.9.2"
+ }