nagiosPlugins.check_ssl_cert: 2.85.1 -> 2.86.0 (#379244)
[NixPkgs.git] / pkgs / by-name / te / textlint-rule-period-in-list-item / package.nix
blob4955c41b99cb88afa92bdb42d926d35a7ec789cf
2   lib,
3   stdenv,
4   fetchFromGitHub,
5   fetchYarnDeps,
6   fixup-yarn-lock,
7   nodejs,
8   yarn,
9   textlint,
10   textlint-rule-period-in-list-item,
13 stdenv.mkDerivation (finalAttrs: {
14   pname = "textlint-rule-period-in-list-item";
15   version = "1.0.1";
17   src = fetchFromGitHub {
18     owner = "textlint-rule";
19     repo = "textlint-rule-period-in-list-item";
20     tag = "v${finalAttrs.version}";
21     hash = "sha256-hAkueH5q5s0kmvKZiOrCxtfmoHtHH0U8cVLhQ7eoqT0=";
22   };
24   offlineCache = fetchYarnDeps {
25     yarnLock = "${finalAttrs.src}/yarn.lock";
26     hash = "sha256-4tVTR/Wpcr/nJrBhqV3AowwcUiFNiuohyKn6yQvorvc=";
27   };
29   nativeBuildInputs = [
30     fixup-yarn-lock
31     nodejs
32     yarn
33   ];
35   configurePhase = ''
36     runHook preConfigure
38     export HOME=$(mktemp -d)
39     yarn config --offline set yarn-offline-mirror "$offlineCache"
40     fixup-yarn-lock yarn.lock
41     yarn --offline --frozen-lockfile --ignore-platform --ignore-scripts --no-progress --non-interactive install
42     patchShebangs node_modules
44     runHook postConfigure
45   '';
47   buildPhase = ''
48     runHook preBuild
50     yarn --offline build
52     runHook postBuild
53   '';
55   installPhase = ''
56     runHook preInstall
58     yarn --offline --production install
59     rm -r test
60     mkdir -p $out/lib/node_modules/textlint-rule-period-in-list-item
61     cp -r . $out/lib/node_modules/textlint-rule-period-in-list-item/
63     runHook postInstall
64   '';
66   passthru.tests = textlint.testPackages {
67     rule = textlint-rule-period-in-list-item;
68     testFile = ./test.md;
69   };
71   meta = {
72     description = "Textlint rule that check with or without period in list item";
73     homepage = "https://github.com/textlint-rule/textlint-rule-period-in-list-item";
74     changelog = "https://github.com/textlint-rule/textlint-rule-period-in-list-item/releases/tag/v${finalAttrs.version}";
75     license = lib.licenses.mit;
76     maintainers = with lib.maintainers; [ natsukium ];
77     platforms = textlint.meta.platforms;
78   };