mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-10-03 13:30:36 +00:00
textlint-rule-write-good: repackage with fetchYarnDeps
(cherry picked from commit c28503fd79)
This commit is contained in:
committed by
github-actions[bot]
parent
0a9de878b9
commit
d9bb9fd8db
79
pkgs/by-name/te/textlint-rule-write-good/package.nix
Normal file
79
pkgs/by-name/te/textlint-rule-write-good/package.nix
Normal file
@@ -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;
|
||||
};
|
||||
})
|
||||
1
pkgs/by-name/te/textlint-rule-write-good/test.md
Normal file
1
pkgs/by-name/te/textlint-rule-write-good/test.md
Normal file
@@ -0,0 +1 @@
|
||||
So the cat was stolen.
|
||||
@@ -10,6 +10,7 @@
|
||||
textlint-rule-alex,
|
||||
textlint-rule-max-comma,
|
||||
textlint-rule-preset-ja-technical-writing,
|
||||
textlint-rule-write-good,
|
||||
}:
|
||||
|
||||
buildNpmPackage rec {
|
||||
@@ -99,6 +100,7 @@ buildNpmPackage rec {
|
||||
textlint-rule-alex
|
||||
textlint-rule-max-comma
|
||||
textlint-rule-preset-ja-technical-writing
|
||||
textlint-rule-write-good
|
||||
]
|
||||
);
|
||||
};
|
||||
|
||||
@@ -139,6 +139,7 @@ mapAliases {
|
||||
inherit (pkgs) textlint; # Added 2024-05-13
|
||||
inherit (pkgs) textlint-rule-alex; # Added 2024-05-16
|
||||
inherit (pkgs) textlint-rule-max-comma; # Added 2024-05-15
|
||||
inherit (pkgs) textlint-rule-write-good; # Added 2024-05-16
|
||||
thelounge = pkgs.thelounge; # Added 2023-05-22
|
||||
three = throw "three was removed because it was no longer needed"; # Added 2023-09-08
|
||||
inherit (pkgs) titanium; # added 2023-08-17
|
||||
|
||||
@@ -231,7 +231,6 @@
|
||||
, "textlint-rule-stop-words"
|
||||
, "textlint-rule-terminology"
|
||||
, "textlint-rule-unexpanded-acronym"
|
||||
, "textlint-rule-write-good"
|
||||
, "thelounge-plugin-closepms"
|
||||
, "thelounge-plugin-giphy"
|
||||
, "thelounge-plugin-shortcuts"
|
||||
|
||||
36
pkgs/development/node-packages/node-packages.nix
generated
36
pkgs/development/node-packages/node-packages.nix
generated
@@ -93527,42 +93527,6 @@ in
|
||||
bypassCache = true;
|
||||
reconstructLock = true;
|
||||
};
|
||||
textlint-rule-write-good = nodeEnv.buildNodePackage {
|
||||
name = "textlint-rule-write-good";
|
||||
packageName = "textlint-rule-write-good";
|
||||
version = "2.0.0";
|
||||
src = fetchurl {
|
||||
url = "https://registry.npmjs.org/textlint-rule-write-good/-/textlint-rule-write-good-2.0.0.tgz";
|
||||
sha512 = "yvOJavJD+PgyUzvsoLDDzDtgCVBva/HNhEvsFnYVugrWz0qy2hr+/4B4wkzjro4wfPbwz20GQe5h13N4DeUEeA==";
|
||||
};
|
||||
dependencies = [
|
||||
sources."@textlint/ast-node-types-13.4.1"
|
||||
sources."@types/unist-2.0.10"
|
||||
sources."adverb-where-0.2.6"
|
||||
sources."boundary-2.0.0"
|
||||
sources."commander-2.20.3"
|
||||
sources."e-prime-0.10.4"
|
||||
sources."no-cliches-0.3.6"
|
||||
sources."passive-voice-0.1.0"
|
||||
sources."structured-source-4.0.0"
|
||||
sources."textlint-rule-helper-2.3.1"
|
||||
sources."too-wordy-0.3.6"
|
||||
sources."unist-util-is-4.1.0"
|
||||
sources."unist-util-visit-2.0.3"
|
||||
sources."unist-util-visit-parents-3.1.1"
|
||||
sources."weasel-words-0.1.1"
|
||||
sources."write-good-1.0.8"
|
||||
];
|
||||
buildInputs = globalBuildInputs;
|
||||
meta = {
|
||||
description = "textlint rule to check your English style with write good";
|
||||
homepage = "https://github.com/textlint-rule/textlint-rule-write-good";
|
||||
license = "MIT";
|
||||
};
|
||||
production = true;
|
||||
bypassCache = true;
|
||||
reconstructLock = true;
|
||||
};
|
||||
thelounge-plugin-closepms = nodeEnv.buildNodePackage {
|
||||
name = "thelounge-plugin-closepms";
|
||||
packageName = "thelounge-plugin-closepms";
|
||||
|
||||
Reference in New Issue
Block a user