diff --git a/pkgs/applications/editors/vscode/extensions/default.nix b/pkgs/applications/editors/vscode/extensions/default.nix index 92bb828f8df4..bbbd5b5dfd3b 100644 --- a/pkgs/applications/editors/vscode/extensions/default.nix +++ b/pkgs/applications/editors/vscode/extensions/default.nix @@ -3712,6 +3712,8 @@ let meta.license = lib.licenses.lgpl3Only; }; + sourcery.sourcery = callPackage ./sourcery.sourcery { }; + spywhere.guides = buildVscodeMarketplaceExtension { mktplcRef = { name = "guides"; diff --git a/pkgs/applications/editors/vscode/extensions/sourcery.sourcery/default.nix b/pkgs/applications/editors/vscode/extensions/sourcery.sourcery/default.nix new file mode 100644 index 000000000000..143ce4204561 --- /dev/null +++ b/pkgs/applications/editors/vscode/extensions/sourcery.sourcery/default.nix @@ -0,0 +1,42 @@ +{ + lib, + stdenv, + vscode-utils, + autoPatchelfHook, + libxcrypt-legacy, +}: + +vscode-utils.buildVscodeMarketplaceExtension { + mktplcRef = { + name = "sourcery"; + publisher = "sourcery"; + version = "1.16.0"; + hash = "sha256-SHgS2C+ElTJW4v90Wg0QcsSL2FoSz+SxZQpgq2J4JiU="; + }; + + postPatch = '' + pushd sourcery_binaries/install + rm -r win ${if stdenv.isLinux then "mac" else "linux"} + popd + ''; + + nativeBuildInputs = lib.optionals stdenv.isLinux [ autoPatchelfHook ]; + + buildInputs = [ + stdenv.cc.cc.lib + libxcrypt-legacy + ]; + + meta = { + changelog = "https://sourcery.ai/changelog/"; + description = "A VSCode extension for Sourcery, an AI-powered code review and pair programming tool for Python"; + downloadPage = "https://marketplace.visualstudio.com/items?itemName=sourcery.sourcery"; + homepage = "https://github.com/sourcery-ai/sourcery-vscode"; + license = lib.licenses.unfree; + maintainers = with lib.maintainers; [ tomasajt ]; + platforms = [ + "x86_64-linux" + "x86_64-darwin" + ]; + }; +}