textlint-rule-max-comma: repackage with fetchYarnDeps
This commit is contained in:
parent
f26194c4f1
commit
95507da635
79
pkgs/by-name/te/textlint-rule-max-comma/package.nix
Normal file
79
pkgs/by-name/te/textlint-rule-max-comma/package.nix
Normal file
@ -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;
|
||||||
|
};
|
||||||
|
})
|
1
pkgs/by-name/te/textlint-rule-max-comma/test.md
Normal file
1
pkgs/by-name/te/textlint-rule-max-comma/test.md
Normal file
@ -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.
|
@ -7,6 +7,7 @@
|
|||||||
makeWrapper,
|
makeWrapper,
|
||||||
runCommand,
|
runCommand,
|
||||||
textlint,
|
textlint,
|
||||||
|
textlint-rule-max-comma,
|
||||||
textlint-rule-preset-ja-technical-writing,
|
textlint-rule-preset-ja-technical-writing,
|
||||||
}:
|
}:
|
||||||
|
|
||||||
@ -94,6 +95,7 @@ buildNpmPackage rec {
|
|||||||
|
|
||||||
tests = lib.mergeAttrsList (
|
tests = lib.mergeAttrsList (
|
||||||
map (package: package.tests) [
|
map (package: package.tests) [
|
||||||
|
textlint-rule-max-comma
|
||||||
textlint-rule-preset-ja-technical-writing
|
textlint-rule-preset-ja-technical-writing
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
|
@ -137,6 +137,7 @@ mapAliases {
|
|||||||
tedicross = throw "tedicross was removed because it was broken"; # added 2023-09-09
|
tedicross = throw "tedicross was removed because it was broken"; # added 2023-09-09
|
||||||
inherit (pkgs) terser; # Added 2023-08-31
|
inherit (pkgs) terser; # Added 2023-08-31
|
||||||
inherit (pkgs) textlint; # Added 2024-05-13
|
inherit (pkgs) textlint; # Added 2024-05-13
|
||||||
|
inherit (pkgs) textlint-rule-max-comma; # Added 2024-05-15
|
||||||
thelounge = pkgs.thelounge; # Added 2023-05-22
|
thelounge = pkgs.thelounge; # Added 2023-05-22
|
||||||
three = throw "three was removed because it was no longer needed"; # Added 2023-09-08
|
three = throw "three was removed because it was no longer needed"; # Added 2023-09-08
|
||||||
inherit (pkgs) titanium; # added 2023-08-17
|
inherit (pkgs) titanium; # added 2023-08-17
|
||||||
|
@ -227,7 +227,6 @@
|
|||||||
, "textlint-rule-common-misspellings"
|
, "textlint-rule-common-misspellings"
|
||||||
, "textlint-rule-diacritics"
|
, "textlint-rule-diacritics"
|
||||||
, "textlint-rule-en-max-word-count"
|
, "textlint-rule-en-max-word-count"
|
||||||
, "textlint-rule-max-comma"
|
|
||||||
, "textlint-rule-no-start-duplicated-conjunction"
|
, "textlint-rule-no-start-duplicated-conjunction"
|
||||||
, "textlint-rule-period-in-list-item"
|
, "textlint-rule-period-in-list-item"
|
||||||
, "textlint-rule-stop-words"
|
, "textlint-rule-stop-words"
|
||||||
|
46
pkgs/development/node-packages/node-packages.nix
generated
46
pkgs/development/node-packages/node-packages.nix
generated
@ -93867,52 +93867,6 @@ in
|
|||||||
bypassCache = true;
|
bypassCache = true;
|
||||||
reconstructLock = true;
|
reconstructLock = true;
|
||||||
};
|
};
|
||||||
textlint-rule-max-comma = nodeEnv.buildNodePackage {
|
|
||||||
name = "textlint-rule-max-comma";
|
|
||||||
packageName = "textlint-rule-max-comma";
|
|
||||||
version = "4.0.0";
|
|
||||||
src = fetchurl {
|
|
||||||
url = "https://registry.npmjs.org/textlint-rule-max-comma/-/textlint-rule-max-comma-4.0.0.tgz";
|
|
||||||
sha512 = "2vKKXNg1YuTqr9/FrHvOGEHFe+6lNSDtzuEv+KRB+tuaj++UNa/YPvyY34UdDYuHUSKNcYdto8GlIUhAJDW9WQ==";
|
|
||||||
};
|
|
||||||
dependencies = [
|
|
||||||
sources."@textlint/ast-node-types-13.4.1"
|
|
||||||
sources."@types/unist-2.0.10"
|
|
||||||
sources."bail-1.0.5"
|
|
||||||
sources."boundary-2.0.0"
|
|
||||||
sources."ccount-1.1.0"
|
|
||||||
sources."comma-separated-tokens-1.0.8"
|
|
||||||
sources."extend-3.0.2"
|
|
||||||
sources."hast-util-from-parse5-5.0.3"
|
|
||||||
sources."hast-util-parse-selector-2.2.5"
|
|
||||||
sources."hastscript-5.1.2"
|
|
||||||
sources."is-buffer-2.0.5"
|
|
||||||
sources."is-plain-obj-2.1.0"
|
|
||||||
sources."parse5-5.1.1"
|
|
||||||
sources."property-information-5.6.0"
|
|
||||||
sources."rehype-parse-6.0.2"
|
|
||||||
sources."sentence-splitter-5.0.0"
|
|
||||||
sources."space-separated-tokens-1.1.5"
|
|
||||||
sources."structured-source-4.0.0"
|
|
||||||
sources."textlint-util-to-string-3.3.4"
|
|
||||||
sources."trough-1.0.5"
|
|
||||||
sources."unified-8.4.2"
|
|
||||||
sources."unist-util-stringify-position-2.0.3"
|
|
||||||
sources."vfile-4.2.1"
|
|
||||||
sources."vfile-message-2.0.4"
|
|
||||||
sources."web-namespaces-1.1.4"
|
|
||||||
sources."xtend-4.0.2"
|
|
||||||
];
|
|
||||||
buildInputs = globalBuildInputs;
|
|
||||||
meta = {
|
|
||||||
description = "textlint rule that limit maxinum comma(,) count of sentence.";
|
|
||||||
homepage = "https://github.com/azu/textlint-rule-max-comma#readme";
|
|
||||||
license = "MIT";
|
|
||||||
};
|
|
||||||
production = true;
|
|
||||||
bypassCache = true;
|
|
||||||
reconstructLock = true;
|
|
||||||
};
|
|
||||||
textlint-rule-no-start-duplicated-conjunction = nodeEnv.buildNodePackage {
|
textlint-rule-no-start-duplicated-conjunction = nodeEnv.buildNodePackage {
|
||||||
name = "textlint-rule-no-start-duplicated-conjunction";
|
name = "textlint-rule-no-start-duplicated-conjunction";
|
||||||
packageName = "textlint-rule-no-start-duplicated-conjunction";
|
packageName = "textlint-rule-no-start-duplicated-conjunction";
|
||||||
|
Loading…
Reference in New Issue
Block a user