+2
pkgs/applications/editors/vscode/extensions/default.nix
+2
pkgs/applications/editors/vscode/extensions/default.nix
+38
pkgs/applications/editors/vscode/extensions/elijah-potter.harper/default.nix
+38
pkgs/applications/editors/vscode/extensions/elijah-potter.harper/default.nix
···
1
+
{
2
+
lib,
3
+
vscode-utils,
4
+
vscode-extension-update-script,
5
+
jq,
6
+
harper,
7
+
moreutils,
8
+
...
9
+
}:
10
+
11
+
vscode-utils.buildVscodeMarketplaceExtension {
12
+
mktplcRef = {
13
+
name = "harper";
14
+
publisher = "elijah-potter";
15
+
version = harper.version;
16
+
hash = "sha256-m9PN1BZf6rLrNnX8meX2TjGx8zGLl0GgnHEgQirh9Oc=";
17
+
};
18
+
19
+
nativeBuildInputs = [
20
+
jq
21
+
moreutils
22
+
];
23
+
24
+
postInstall = ''
25
+
cd "$out/$installPrefix"
26
+
jq '.contributes.configuration.properties."harper.path".default = "${harper}/bin/harper-ls"' package.json | sponge package.json
27
+
'';
28
+
passthru.updateScript = vscode-extension-update-script { };
29
+
30
+
meta = {
31
+
changelog = "https://github.com/Automattic/harper/releases/tag/v${harper.version}";
32
+
description = "The grammar checker for developers as a Visual Studio Code extension";
33
+
downloadPage = "https://marketplace.visualstudio.com/items?itemName=elijah-potter.harper";
34
+
homepage = "https://github.com/automattic/harper";
35
+
license = lib.licenses.asl20;
36
+
maintainers = with lib.maintainers; [ MasterEvarior ];
37
+
};
38
+
}