diff --git a/pkgs/applications/editors/vscode/extensions/default.nix b/pkgs/applications/editors/vscode/extensions/default.nix index 71a8a9fba418..3697428473eb 100644 --- a/pkgs/applications/editors/vscode/extensions/default.nix +++ b/pkgs/applications/editors/vscode/extensions/default.nix @@ -2112,17 +2112,7 @@ let }; }; - gruntfuggly.todo-tree = buildVscodeMarketplaceExtension { - mktplcRef = { - name = "todo-tree"; - publisher = "Gruntfuggly"; - version = "0.0.226"; - hash = "sha256-Fj9cw+VJ2jkTGUclB1TLvURhzQsaryFQs/+f2RZOLHs="; - }; - meta = { - license = lib.licenses.mit; - }; - }; + gruntfuggly.todo-tree = callPackage ./gruntfuggly.todo-tree { }; hars.cppsnippets = buildVscodeMarketplaceExtension { mktplcRef = { diff --git a/pkgs/applications/editors/vscode/extensions/gruntfuggly.todo-tree/default.nix b/pkgs/applications/editors/vscode/extensions/gruntfuggly.todo-tree/default.nix new file mode 100644 index 000000000000..5a169aee2a20 --- /dev/null +++ b/pkgs/applications/editors/vscode/extensions/gruntfuggly.todo-tree/default.nix @@ -0,0 +1,47 @@ +{ + jq, + lib, + moreutils, + ripgrep, + vscode-utils, + vscode-extension-update-script, +}: + +vscode-utils.buildVscodeMarketplaceExtension { + mktplcRef = { + name = "todo-tree"; + publisher = "Gruntfuggly"; + version = "0.0.226"; + hash = "sha256-Fj9cw+VJ2jkTGUclB1TLvURhzQsaryFQs/+f2RZOLHs="; + }; + + __structuredAttrs = true; + strictDeps = true; + + nativeBuildInputs = [ + jq + moreutils + ]; + + buildInputs = [ ripgrep ]; + + postInstall = '' + cd "$out/$installPrefix" + jq '(.contributes.configuration[] | select(.title == "%todo-tree.configuration.regex%") | .properties."todo-tree.ripgrep.ripgrep".default) = $s' \ + --arg s "${lib.getExe ripgrep}" \ + package.json | sponge package.json + ''; + + passthru.updateScript = vscode-extension-update-script { }; + + meta = { + changelog = "https://marketplace.visualstudio.com/items/Gruntfuggly.todo-tree/changelog"; + description = "Show TODO, FIXME, etc. comment tags in a tree view"; + downloadPage = "https://marketplace.visualstudio.com/items?itemName=Gruntfuggly.todo-tree"; + homepage = "https://github.com/Gruntfuggly/todo-tree"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ + sandarukasa + ]; + }; +}